https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118538

--- Comment #22 from Disservin <disservin.social at gmail dot com> ---
(In reply to Sam James from comment #21)
> (In reply to Disservin from comment #20)
> 
> Could you try build a vanilla GCC in the github runner (possibly with
> --enable-default-pie or whatever else) and see if it fails using that?
> 
> I can try spend some time trying to reproduce again myself but not today or
> the next few days.

i just tried this locally on my pi.. where everything works as expected, though
i chose the latest commit from master at that point in time
(047b7f9a5665a5cb1267861deece3e5d6ce5c5fb)

➜  ~ /usr/local/bin/g++ -v
Using built-in specs.
COLLECT_GCC=/usr/local/bin/g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/aarch64-unknown-linux-gnu/15.0.1/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../gcc/configure --enable-languages=c,c++ --disable-multilib
--enable-default-pie
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.1 20250302 (experimental) (GCC)
➜  ~ /usr/local/bin/g++ -O0 -std=c++17 -Wall -Wextra -Wpedantic -Wuninitialized
-fno-strict-aliasing -fwrapv -g3 gcc-bug.cpp && ./a.out
gcc-bug.cpp: In function ‘int main()’:
gcc-bug.cpp:28:19: warning: variable ‘reader’ set but not used
[-Wunused-but-set-variable]
   28 | int main() { auto reader = Reader("file", 1); }
      |                   ^~~~~~
terminate called after throwing an instance of 'int'
[1]    4114720 abort (core dumped)  ./a.out

i'll try to compile gcc 14.2 in the next few days with the exact same configure
option as the distributed apt package...

Reply via email to