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

            Bug ID: 120862
           Summary: ICE on x86_64-linux-gnu: verify_gimple failed during
                    IPA pass: remove_symbols at -O2/s with aligned
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jiangchangwu at smail dot nju.edu.cn
  Target Milestone: ---

Compiler Explorer: https://gcc.godbolt.org/z/3fGG4K94r

*******************************************************************************
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
int b;
void c() {
  struct d {
    int a[b];
  } __attribute__((aligned)) e() {
    struct d f;
    return f;
  }
  struct d g() { return e(); }
  g();
}
void main() {}

*******************************************************************************
Command Lines:
$ gcc -O2 mutant.c
mutant.c: In function 'e':
mutant.c:12:1: error: invalid conversion in return statement
   12 | void main() {}
      | ^~~~
struct d

struct d

# VUSE <.MEM_14>
return <retval>;
during IPA pass: remove_symbols
mutant.c:12:1: internal compiler error: verify_gimple failed
0x5554b38 internal_error(char const*, ...)
        ../../gcc/gcc/diagnostic-global-context.cc:517
0x2211fdc verify_gimple_in_cfg(function*, bool, bool)
        ../../gcc/gcc/tree-cfg.cc:5700
0x1e90b0f execute_function_todo
        ../../gcc/gcc/passes.cc:2103
0x1e8eb8c do_per_function
        ../../gcc/gcc/passes.cc:1710
0x1e90f6b execute_todo
        ../../gcc/gcc/passes.cc:2155
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