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

            Bug ID: 116134
           Summary: [15 Regression] ICE: 'verify_gimple' failed
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: patrick at rivosinc dot com
  Target Milestone: ---

Testcase:
int a;
int b;
int d;
void c() { 1UL <= (d < b) != (1UL & (0 < a | 0L)); }


Command/backtrace:
> /scratch/tc-testing/tc-compiler-fuzz-trunk/build-gcv/bin/riscv64-unknown-linux-gnu-gcc
>  red.c -c -S -o /dev/null
red.c: In function 'c':
red.c:4:6: error: type mismatch in binary expression
    4 | void c() { 1UL <= (d < b) != (1UL & (0 < a | 0L)); }
      |      ^
unsigned int

unsigned int

long int

_8 = _4 ^ _7;
red.c:4:6: internal compiler error: 'verify_gimple' failed
0x2ddf545 internal_error(char const*, ...)
        ../../../gcc/gcc/diagnostic-global-context.cc:491
0x13d8775 verify_gimple_in_seq(gimple*, bool)
        ../../../gcc/gcc/tree-cfg.cc:5332
0x104825b gimplify_body(tree_node*, bool)
        ../../../gcc/gcc/gimplify.cc:19460
0x10483e9 gimplify_function_tree(tree_node*)
        ../../../gcc/gcc/gimplify.cc:19578
0xe50607 cgraph_node::analyze()
        ../../../gcc/gcc/cgraphunit.cc:687
0xe52c17 analyze_functions
        ../../../gcc/gcc/cgraphunit.cc:1251
0xe53961 symbol_table::finalize_compilation_unit()
        ../../../gcc/gcc/cgraphunit.cc:2560
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.

Godbolt:
riscv: https://godbolt.org/z/5ncqjTvs3
x86: https://godbolt.org/z/sbW96d97v

Found via fuzzer.

Reply via email to