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

            Bug ID: 127263
           Summary: [17 Regression] ICE at -O2 during GIMPLE pass: pcom
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xxs_chy at outlook dot com
  Target Milestone: ---

Reproducer: https://godbolt.org/z/hcn1q96oj
Reduced case:
typedef _Bool (*fp_t_3)();
_Bool f3_ob12;
void f3() {
  fp_t_3 *init10;
lbl_f6_b19:
  f3_ob12 = *init10;
  *(void **)init10 = 0;
  if (f3_ob12)
    goto lbl_f6_b19;
}

Dump at -O2:
<source>: In function 'f3':
<source>:3:6: error: non-trivial conversion in 'integer_cst'
    3 | void f3() {
      |      ^~
bool (*fp_t_3) (void)
void *
init10__lsm0.5_14 = 0B;
during GIMPLE pass: pcom
<source>:3:6: internal compiler error: verify_gimple failed
0x284ad38 diagnostics::context::diagnostic_impl(rich_location*,
diagnostics::metadata const*, diagnostics::option_id, char const*,
__va_list_tag (*) [1], diagnostics::kind)
        ???:0
0x283f97b internal_error(char const*, ...)
        ???:0
0x127645e verify_gimple_in_cfg(function*, bool, bool)
        ???:0
/cefs/97/973eb283a3d40b9349922625_gcc-trunk-20260908/bin/../libexec/gcc/x86_64-linux-gnu/17.0.0/cc1
-quiet -imultiarch x86_64-linux-gnu -iprefix
/cefs/97/973eb283a3d40b9349922625_gcc-trunk-20260908/bin/../lib/gcc/x86_64-linux-gnu/17.0.0/
<source> -quiet -dumpdir /app/ -dumpbase output.c -dumpbase-ext .c -masm=intel
-mtune=generic -march=x86-64 -g -O2 -fdiagnostics-color=always -fno-verbose-asm
-o /app/output.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.

Reply via email to