Testsuite requires checking for nested crash tests
Nested compiler crash tests in the testsuite now require the 'checking' target to be enabled, preventing failures when GCC is built without checking.
This commit addresses PR124872 by modifying the testsuite to require the ‘checking’ effective target for specific nested crash tests. These tests were failing when GCC was compiled without checking enabled. By adding this requirement, the testsuite now correctly skips these tests on configurations where checking is disabled, ensuring the test suite’s integrity and preventing spurious failures. Documentation for build configurations has also been updated.
In Details
This change updates GCC's testsuite to handle nested compiler crash tests more robustly. Previously, tests like crash-test-nested-ice.c and crash-test-nested-write-through-null.c would fail if the compiler was built without the -fcheck-pointer-bounds or equivalent checking options enabled. This commit introduces a new effective target, checking, in lib/et-static.def, and requires it for these tests. This ensures that these tests are only run when the compiler is built with bounds checking enabled, preventing test failures on standard configurations.
- Testsuite
- A collection of tests used to verify the correctness of a software system, in this case, the GCC compiler.
- Crash test
- A test case designed to trigger a compiler internal error (ICE) or other severe failure to verify error reporting and robustness.
- Nested crash test
- A crash test where the error-inducing scenario occurs within another complex construct, such as within a nested function or a complex control flow structure.
- Effective target
- A set of compiler options and features that define the target environment for a specific test case within the GCC testsuite.
- ICE
- Internal Compiler Error, a crash within the compiler itself rather than an error in the generated code.