https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123809
Bug ID: 123809
Summary: Irreproducible ICE on Ubuntu/WSL G++-14
Product: gcc
Version: 14.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: janschultke at googlemail dot com
Target Milestone: ---
Created attachment 63482
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63482&action=edit
Preprocessed source that causes ICE for GCC 14.2
I have very strange bug that is hard to reproduce.
Find attached a cpp file that consistently causes GCC to ICE for me. I don't
know how to get to a minimal reproducible example because removing random bits
of code sometimes makes the ICE go away. For example, trying to trim down the
code and removing random unused includes fixes the issue, but there's no logic
to any of it. What causes the ICE happens totally at random.
I get the following output:
> $ g++-14 -freport-bug -std=c++23 -c ice-14.cpp -o ice-14.cpp.o
> ‘
> internal compiler error: error reporting routines re-entered.
> 0x7f06fcf821c9 __libc_start_call_main
> ../sysdeps/nptl/libc_start_call_main.h:58
> 0x7f06fcf8228a __libc_start_main_impl
> ../csu/libc-start.c:360
> Please submit a full bug report, with preprocessed source.
> Please include the complete backtrace with any bug report.
> See <file:///usr/share/doc/gcc-14/README.Bugs> for instructions.
> The bug is not reproducible, so it is likely a hardware or OS problem.
> $ g++-14 --version
> g++-14 (Ubuntu 14.2.0-4ubuntu2~24.04) 14.2.0
I am running g++ using WSL. I did manage to trigger the same ICE with the same
source with GCC 13, and this happens consistently each time I compile, so this
is not a spurious failure at least; it's consistent.
It doesn't make it simpler that the part about the bug not being reproducible
seems accurate; copying the same file onto Compiler Explorer doesn't result in
an ICE.
How do I even begin to track down the issue then? I was recommended to use
"--param ggc-min-expand=0 --param ggc-min-heapsize=0", but this just takes too
long to complete.