On Sun, 2026-02-01 at 12:30 -0500, Nathan Sidwell wrote: > Here's another ICE patch that has proved helpful in reducing > confusion about > which version of the compiler crashed. Namely print the version info > in the ICE > output. > Hi Nathan
> From: Nathan Sidwell <[email protected]> > Date: Sun, 1 Feb 2026 12:27:21 -0500 > Subject: [PATCH] Print version info on ICE > > gcc/ > * diagnostics/context.cc (context::action_after_output): > Print compiler version information in ICE info. > --- > gcc/diagnostics/context.cc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/gcc/diagnostics/context.cc b/gcc/diagnostics/context.cc > index 4c24e5660d0..2718f70f601 100644 > --- a/gcc/diagnostics/context.cc > +++ b/gcc/diagnostics/context.cc > @@ -1022,14 +1022,14 @@ context::action_after_output (enum kind diag_kind) > if (m_abort_on_error) > real_abort (); > > + fnotice (stderr, "GCC %s%s\n", pkgversion_string, version_string); > + > bool space = false; > for (auto *argv = saved_argv; *argv; space = true) > fnotice (stderr, &" %s"[1 - space], *argv++); > fnotice (stderr, "\n"); > freeargv (saved_argv); > > - fnotice (stderr, "GCC %s%s\n", pkgversion_string, version_string); > - The description and ChangeLog suggest we're adding info here, but it looks like we're already printing the version, and that the patch is swapping the order in which we print the version and the command-line args, so that the version comes first. Is that the intent? Thanks Dave > if (m_report_bug) > fnotice (stderr, "Please submit a full bug report, " > "with preprocessed source.\n"); > -- > 2.52.0
