https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79673
Bug ID: 79673
Summary: GIMPLE verification fails when compiling code with
__seg_gs
Product: gcc
Version: 7.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
Assignee: unassigned at gcc dot gnu.org
Reporter: me at manueljacob dot de
CC: jakub at gcc dot gnu.org, rguenther at suse dot de
Target Milestone: ---
Created attachment 40814
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=40814&action=edit
Compiler traceback
This happens at least on x86-64 with -O2 and higher. If I pass code like this,
void used(double x);
void usel(long x);
void test(int c) {
if (c) {
used(*((double __seg_gs *) 0));
} else {
usel(*((long __seg_gs *) 0));
}
}
the compiler ICEs (using some GCC-slang I learned from the comments to my
previous bug report ;)) in verify_gimple (full traceback attached).
It seems like the problematic IR is created in SSA PRE, although my GCC
debugging skills are too limited to verify this (I couldn't manage to print the
IR before and after this particular pass).