https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125420
Bug ID: 125420
Summary: [16/17 Regression] compiler hangs at -O3
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/eK4jT1K5a
Testcase:
#include <stdint.h>
int64_t g2;
_Bool g10, f5_c8;
void f5()
{
int16_t v5;
_Bool c11;
lbl_b1:
g10 = c11 = 9;
if (f5_c8)
goto lbl_b6;
lbl_bf5:
g10 = 0;
goto lbl_bf9;
lbl_b6:
g2 = 604998164811594898;
if (g10) goto lbl_bf5;
switch (v5)
{
case 4: goto lbl_sw13;
default: goto lbl_sw_def14;
}
lbl_br8:
g10 = 0;
lbl_bf9:
c11 = 0;
goto lbl_b6;
lbl_sw13:
if (c11) goto lbl_b1;
lbl_sw_def14:
if (c11) goto lbl_bf9;
goto lbl_br8;
}
GCC hangs when compiling this testcase at -O3.