https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90547
Bug ID: 90547
Summary: [8/9/10 Regression] ICE in gen_lowpart_general, at
rtlhooks.c:63
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: [email protected]
Target Milestone: ---
This is a follow-up of pr89945 :
$ cat z1.c
void
foo ()
{
void *g[] = {&&a, &&b};
for (unsigned c = 0x1F;; c >>= 1)
{
unsigned d = "a"+1;
long e = 8;
while (e)
{
a: goto *g[c&d];
b: e--;
}
}
}
$ gcc-6 -c z1.c -O2
z1.c: In function 'foo':
z1.c:8:20: warning: initialization makes integer from pointer without a cast
[-Wint-conversion]
unsigned d = "a"+1;
^~~
# gcc-10-20190519 -c z1.c also compiles it.
$ gcc-10-20190519 -c z1.c -O2
z1.c: In function 'foo':
z1.c:8:20: warning: initialization of 'unsigned int' from 'char *' makes
integer from pointer without a cast [-Wint-conversion]
8 | unsigned d = "a"+1;
| ^~~
during RTL pass: split1
z1.c:17:1: internal compiler error: in gen_lowpart_general, at rtlhooks.c:63
17 | }
| ^
0xa2e978 gen_lowpart_general(machine_mode, rtx_def*)
../../gcc/rtlhooks.c:63
0xf92b0e gen_split_144(rtx_insn*, rtx_def**)
../../gcc/config/i386/i386.md:8529
0x112a34f split_17
../../gcc/config/i386/i386.md:1062
0x112fd4c split_insns(rtx_def*, rtx_insn*)
../../gcc/config/i386/i386.md:13105
0x79c5f2 try_split(rtx_def*, rtx_insn*, int)
../../gcc/emit-rtl.c:3851
0x9f10f1 split_insn
../../gcc/recog.c:2901
0x9f5212 split_all_insns()
../../gcc/recog.c:3005
0x9f5318 execute
../../gcc/recog.c:3905
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.