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

            Bug ID: 120839
           Summary: ICE on x86_64-linux-gnu: in
                    ix86_finalize_stack_frame_flags, at
                    config/i386/i386.cc:8738 at -O1 and above with aligned
                    on struct
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jiangchangwu at smail dot nju.edu.cn
  Target Milestone: ---

Compiler Explorer: https://gcc.godbolt.org/z/e7M4d86c5

*******************************************************************************
gcc version:
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/home/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/16.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../gcc/configure --disable-multilib --disable-bootstrap
--enable-languages=c,c++ --prefix=/home/software/gcc-trunk --enable-coverage
--disable-werror --enable-checking=yes
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 16.0.0 20250613 (experimental) (GCC)

*******************************************************************************
Program:
$ cat mutant.c
typedef struct {
  long double a, b
} c __attribute__((aligned(32)));
double d;
void e(c f) { d = f.a; }

*******************************************************************************
Command Lines:
$ gcc -O1 mutant.c
mutant.c:3:1: warning: no semicolon at end of struct or union
    3 | } c __attribute__((aligned(32)));
      | ^
during RTL pass: pro_and_epilogue
mutant.c: In function 'e':
mutant.c:5:24: internal compiler error: in ix86_finalize_stack_frame_flags, at
config/i386/i386.cc:8738
    5 | void e(c f) { d = f.a; }
      |                        ^
0x5554b38 internal_error(char const*, ...)
        ../../gcc/gcc/diagnostic-global-context.cc:517
0x54d2d0a fancy_abort(char const*, int, char const*)
        ../../gcc/gcc/diagnostic.cc:1803
0x2af82c6 ix86_finalize_stack_frame_flags
        ../../gcc/gcc/config/i386/i386.cc:8738
0x2b00b9e ix86_expand_epilogue(int)
        ../../gcc/gcc/config/i386/i386.cc:10039
0x40ca69d gen_epilogue()
        ../../gcc/gcc/config/i386/i386.md:21030
0x2accf69 target_gen_epilogue
        ../../gcc/gcc/config/i386/i386.md:20528
0x17a2a30 make_epilogue_seq
        ../../gcc/gcc/function.cc:6013
0x17a2c74 thread_prologue_and_epilogue_insns()
        ../../gcc/gcc/function.cc:6095
0x17a4f39 rest_of_handle_thread_prologue_and_epilogue
        ../../gcc/gcc/function.cc:6609
0x17a5387 execute
        ../../gcc/gcc/function.cc:6695
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.

Reply via email to