skeeto / w64devkit

Portable C and C++ Development Kit for x64 (and x86) Windows
The Unlicense
2.66k stars 185 forks source link

gcc 14.1 regression in w64devkit 1.23 #138

Open j4reporting opened 3 weeks ago

j4reporting commented 3 weeks ago

I encountered this problem today.

see upstream https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115038 for patch can't reproduce on MSYS2

$ cat repro.cpp
// gcc -c -fno-omit-frame-pointer -O2 repro.cpp
template <typename a> void b(a, a);
template <typename a> void c(a, a, float);
float d;
void e() {
  float f;
  c(f, f, d);
  b(0.0f, f);
}

$ gcc -c -fno-omit-frame-pointer -O2 repro.cpp
during RTL pass: final
repro.cpp: In function 'void e()':
repro.cpp:9:1: internal compiler error: in seh_cfa_offset, at config/i386/winnt.cc:1137
    9 | }
      | ^
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.
skeeto commented 3 weeks ago

Thanks for the detailed report! After cherry-picking the upstream patch it appears to be fixed in w64devkit (7d6330af). I don't know if I'll make a release before GCC 14.2 comes out, so this may not matter much, but in the meantime anyone who's building w64devkit themselves can benefit.

Koromix commented 20 hours ago

Hi! I also git this ICE with several source files. I've downgraded to the previous w64devkit release in the meantime.