https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64353
Bug ID: 64353 Summary: ICE: in execute_todo, at passes.c:1986 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ Assignee: unassigned at gcc dot gnu.org Reporter: adam at os dot inf.tu-dresden.de The following code generates an ICE: class C { int y, x; void i(); bool __attribute__((const)) xx() { return x; } }; void C::i() { if (xx()) x = 1; } $ g++ -c -O2 t.i t.i: In member function ‘void C::i()’: t.i:12:1: internal compiler error: in execute_todo, at passes.c:1986 } ^ 0xbc7b28 execute_todo ../../gcc/gcc/passes.c:1986 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. See <http://gcc.gnu.org/bugs.html> for instructions. $ g++ --version g++ (GCC) 5.0.0 20141218 (experimental) Admittedly the attribute((const)) should not be there. Also, removing 'y' will also not emit an ICE.