https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80632
Bug ID: 80632
Summary: error: invalid PHI argument with -O2
Product: gcc
Version: 7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
Created attachment 41320
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41320&action=edit
C source code
The attached code does this with today's gcc trunk and flag -O2:
$ /home/dcb/gcc/results/bin/gcc -c -w -O2 /tmp/q.i
xlock.c: In function ‘monitor_powered_on_p’:
xlock.c:4059:1: error: invalid PHI argument
}
^
.MEM
xlock.c:4059:1: error: invalid PHI argument
.MEM
.MEM_7 = PHI <.MEM_11(2), .MEM_12(3), .MEM_13(4), .MEM(11), .MEM(10)>
xlock.c:4059:1: internal compiler error: verify_gimple failed
0xc860d2 verify_gimple_in_cfg(function*, bool)
../../trunk/gcc/tree-cfg.c:5266
0xb12976 execute_function_todo
../../trunk/gcc/passes.c:1968
0xb14f61 do_per_function
../../trunk/gcc/passes.c:1652