https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115426
Bug ID: 115426 Summary: ICE in execute_todo, at passes.cc:2138 Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: iamanonymous.cs at gmail dot com Target Milestone: --- Target: x86_64 ******************************************************************************* The compiler produces an internal error when compiling the provided code with the specified options. The issue occurs during the GIMPLE pass (walloca), causing an internal compiler error in the execute_todo function at passes.cc:2138. ******************************************************************************* OS and Platform: # uname -a Linux ubuntu 4.15.0-213-generic #224-Ubuntu SMP Mon Jun 19 13:30:12 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux ******************************************************************************* # gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/root/gdbtest/gcc/gcc-15/libexec/gcc/x86_64-pc-linux-gnu/15.0.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /root/gdbtest/gcc/obj/../gcc/configure --prefix=/root/gdbtest/gcc/gcc-15 --enable-languages=c,c++,fortran,go --disable-multilib Thread model: posix Supported LTO compression algorithms: zlib gcc version 15.0.0 20240509 (experimental) (GCC) ******************************************************************************* Program: # cat fam-asm.c #include <stdio.h> #include <complex.h> _Complex float fcs(_Complex float x) { float ixy; float diff, sum; _Complex float r; __asm__("fmul %s[ixy], %s[xr], %s[yr]\n" "\tfsub %s[diff], %s[xr], %s[yr]\n" "\tfadd %s[sum], %s[xr], %s[yr]\n" "\tfmul %s[rr], %s[diff], %s[sum]\n" "\tfadd %s[ri], %s[ixy], %s[ixy]\n" : [ixy] "=&w" (ixy), [diff] "=&w" (diff), [sum] "=w" (sum), [rr] "=w" (__real__ r), [ri] "=w" (__imag__ r) : [xr] "w" (__real__ x), [yr] "w"( __imag__ x) : ); return r; } int main(int argc, char *argv[]) { _Complex float i = 0.0f + I * 1.0f; _Complex float i2 = fcs(i); printf("%f+i%f\n", __real__ i2, __imag__ i2); } ******************************************************************************* Command Lines: # gcc fam-asm.c -Wall -Wextra -o fam-asm.out fam-asm.c: In function ‘main’: fam-asm.c:19:15: warning: unused parameter ‘argc’ [-Wunused-parameter] 19 | int main(int argc, char *argv[]) | ~~~~^~~~ fam-asm.c:19:27: warning: unused parameter ‘argv’ [-Wunused-parameter] 19 | int main(int argc, char *argv[]) | ~~~~~~^~~~~~ during GIMPLE pass: walloca fam-asm.c: In function ‘fcs’: fam-asm.c:24:2: internal compiler error: in execute_todo, at passes.cc:2138 24 | } | ^ 0x839f1b execute_todo /root/gdbtest/gcc/obj/../gcc/gcc/passes.cc:2138 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <https://gcc.gnu.org/bugs/> for instructions. ******************************************************************************* Also ICE on trunk, compiler explorer:https://godbolt.org/z/soaoeW5z7 *******************************************************************************