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

            Bug ID: 128865
           Summary: ICE at -O1 and above in lower_stmt, at
                    gimple-lower-bitint.cc:6950
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haoxintu at gmail dot com
  Target Milestone: ---

Hi,

$cat repro.c
enum E : signed _BitInt(256) { C = 90 };

int f (enum E x)
{
  return x > C || x < 0;
}


$ gcc-trunk -c -std=c2y -O1 repro.c 
during GIMPLE pass: bitintlower
repro.c: In function ‘f’:
repro.c:3:5: internal compiler error: in lower_stmt, at
gimple-lower-bitint.cc:6950
    3 | int f (enum E x)
      |     ^
0x250b99f internal_error(char const*, ...)
        ../../gcc/diagnostic-global-context.cc:787
0x858673 fancy_abort(char const*, int, char const*)
        ../../gcc/diagnostics/context.cc:1813
0x84e1a3 lower_stmt
        ../../gcc/gimple-lower-bitint.cc:6950
0x22ff783 gimple_lower_bitint
        ../../gcc/gimple-lower-bitint.cc:8663
/home/haoxin/research/gcc/build/libexec/gcc/x86_64-pc-linux-gnu/17.0.0/cc1
-quiet -imultiarch x86_64-linux-gnu repro.c -quiet -dumpbase repro.c
-dumpbase-ext .c -mtune=generic -march=x86-64 -O1 -std=c2y -o /tmp/ccVa1M08.s
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.

Reproduced in Godbolt: https://godbolt.org/z/W9bcf7rzf

Thanks.

Reply via email to