Sigh,
I'd forgotten to squash 2 patches. This is what I meant :)
nathan
On 04/02/2026 15:09, Nathan Sidwell wrote:
Hi David,
That was not my intent, I had confused myself as to what was already there.
Disregard this patch
On 01/02/2026 16:40, David Malcolm wrote:
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
--
Nathan Sidwell
From afcf171868422dd7bfe4ececc3954e620bfcb1b4 Mon Sep 17 00:00:00 2001
From: Nathan Sidwell <[email protected]>
Date: Wed, 4 Feb 2026 15:13:34 -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 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/diagnostics/context.cc b/gcc/diagnostics/context.cc
index 03d57066584..2718f70f601 100644
--- a/gcc/diagnostics/context.cc
+++ b/gcc/diagnostics/context.cc
@@ -1022,6 +1022,8 @@ 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++);
--
2.52.0