https://gcc.gnu.org/g:a2bd29ccfcb372472cccb4552843a10c35e4cf20
commit r17-5973-ga2bd29ccfcb372472cccb4552843a10c35e4cf20 Author: Torbjörn SVENSSON <[email protected]> Date: Sun Nov 1 13:54:48 2026 +0100 testsuite: Require checking for nested crash tests [PR124872] The nested crash tests fail when the compiler is built without checking. Add a checking effective target and use it to skip these tests. PR testsuite/124872 gcc/ChangeLog: * doc/sourcebuild.texi: Document checking. gcc/testsuite/ChangeLog: * lib/et-static.def (checking): New effective target. * gcc.dg/plugin/crash-test-nested-ice.c: Require checking. * gcc.dg/plugin/crash-test-nested-write-through-null.c: Likewise. Signed-off-by: Torbjörn SVENSSON <[email protected]> Diff: --- gcc/doc/sourcebuild.texi | 3 +++ gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c | 1 + gcc/testsuite/gcc.dg/plugin/crash-test-nested-write-through-null.c | 1 + gcc/testsuite/lib/et-static.def | 4 ++++ 4 files changed, 9 insertions(+) diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi index a3e2abd729be..20c3c2d10d6b 100644 --- a/gcc/doc/sourcebuild.texi +++ b/gcc/doc/sourcebuild.texi @@ -3067,6 +3067,9 @@ Target supports automatic stack alignment. @item branch_cost Target supports @option{-branch-cost=N}. +@item checking +Compiler has been configured with internal checking enabled. + @item const_volatile_readonly_section Target places const volatile variables in readonly sections. diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c b/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c index 5a98813896fb..eda7c7cfdf64 100644 --- a/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c +++ b/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target checking } */ /* { dg-skip-if "Target frontend exits early on syntax recovery errors" { hppa*-*-hpux* } } */ /* { dg-additional-options "-fno-report-bug" } */ /* { dg-additional-options "-fplugin-arg-crash_test_plugin-nested" } */ diff --git a/gcc/testsuite/gcc.dg/plugin/crash-test-nested-write-through-null.c b/gcc/testsuite/gcc.dg/plugin/crash-test-nested-write-through-null.c index 3f1277bff162..fa3bdde6d8a5 100644 --- a/gcc/testsuite/gcc.dg/plugin/crash-test-nested-write-through-null.c +++ b/gcc/testsuite/gcc.dg/plugin/crash-test-nested-write-through-null.c @@ -1,4 +1,5 @@ /* { dg-do compile } */ +/* { dg-require-effective-target checking } */ /* { dg-skip-if "Target frontend exits early on syntax recovery errors" { hppa*-*-hpux* } } */ /* { dg-additional-options "-fno-report-bug" } */ /* { dg-additional-options "-fplugin-arg-crash_test_plugin-nested" } */ diff --git a/gcc/testsuite/lib/et-static.def b/gcc/testsuite/lib/et-static.def index b5a323359208..76c9a3e3a0f4 100644 --- a/gcc/testsuite/lib/et-static.def +++ b/gcc/testsuite/lib/et-static.def @@ -24,6 +24,10 @@ # Keep this sorted alphabetically by effective-target name. */ +checking +CHECKING_P +the compiler was built with checking enabled + code_6_gottpoff_reloc HAVE_AS_R_X86_64_CODE_6_GOTTPOFF assembler and linker support R_X86_64_CODE_6_GOTTPOFF
