On Thu, 2026-07-30 at 16:28 +0530, Senthil Kumar Selvaraj wrote:
> Hello,
>
> I noticed that gcc.dg/plugin/{crash-test-nested-ice.c and
> gcc.dg/plugin/crash-test-nested-write-through-null.c fail on
> releases/gcc-16, but pass on master for the same set configure
> options (for e.g., FAILs on
> https://gcc.gnu.org/pipermail/gcc-testresults/2026-July/880522.html
> vs
> https://gcc.gnu.org/pipermail/gcc-testresults/2026-July/880517.html).
>
> The failures look like this in gcc.log
>
> /src/gcc/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c: In function
> 'test_1':
> /src/gcc/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c:11:3: error:
> placeholder
> /src/gcc/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c:11: confused by
> earlier errors, bailing out
> compiler exited with status 1
> XPASS: gcc.dg/plugin/crash-test-nested-ice.c -fplugin=./crash_test_plugin.so
> (internal compiler error)
> PASS: gcc.dg/plugin/crash-test-nested-ice.c -fplugin=./crash_test_plugin.so
> at line 12 (test for errors, line 11)
> FAIL: gcc.dg/plugin/crash-test-nested-ice.c -fplugin=./crash_test_plugin.so
> dg-regexp 13 not found: "during GIMPLE pass:
> crash_test"
> FAIL: gcc.dg/plugin/crash-test-nested-ice.c -fplugin=./crash_test_plugin.so
> (test for excess errors)
> Excess errors:
> /src/gcc/gcc/testsuite/gcc.dg/plugin/crash-test-nested-ice.c:11: confused by
> earlier errors, bailing out
>
>
> Tracked it down to context.cc's context::report_diagnostic using
> !CHECKING_P. As documented in install.texi, with no explicit
> --enable-checking when configuring, the configure machinery sets
> --enable-checking=release on release branches (based on the contents
> of the gcc/DEV-PHASE text file). That defines CHECKING_P to 0, and
> execution takes the "confused by earlier errors" path, terminating
> with ICE_EXIT_CODE. The m_internal_error hook doesn't get to run at
> all, causing the failures.
>
> Not sure what the right fix is - should the client hook also run
> on the !CHECKING_P path too? Or if done intentionally, should the test
> be somehow skipped on release branches?
>
> Regards
> Senthil