http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58946
Bug ID: 58946 Summary: [4.9 Regression] internal compiler error: in operator[], at vec.h:722 Product: gcc Version: 4.9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: octoploid at yandex dot com Building dev-util/kdevplatform-1.5.2 ICEs. markus@x4 tmp % cat test.ii class A { public: A(int p1) : m_index(p1) { if (!p1) m_index = DummyMask; } enum { DummyMask = 1 << 31 }; unsigned m_fn1() const { int a; a = m_index & DummyMask; if (a) return 0; return m_index; } unsigned m_index; }; class B { public: int contains___trans_tmp_4; void m_fn1(int &p1) { const A &b = p1; contains___trans_tmp_4 = b.m_fn1(); } }; void fn1(A p1, B &p2) { int c; c = p1.m_fn1(); p2.m_fn1(c); } markus@x4 tmp % g++ -c -O2 test.ii test.ii: In function ‘void fn1(A, B&)’: test.ii:28:6: internal compiler error: in operator[], at vec.h:722 void fn1(A p1, B &p2) { ^ 0xc819a7 vec<operand_entry*, va_heap, vl_embed>::operator[](unsigned int) ../../gcc/gcc/vec.h:722 0xc84207 vec<operand_entry*, va_heap, vl_embed>::operator[](unsigned int) ../../gcc/gcc/tree.h:2806 0xc84207 vec<operand_entry*, va_heap, vl_ptr>::operator[](unsigned int) ../../gcc/gcc/vec.h:1152 0xc84207 update_ops ../../gcc/gcc/tree-ssa-reassoc.c:2619 0xc8c1fa maybe_optimize_range_tests ../../gcc/gcc/tree-ssa-reassoc.c:2907 0xc8c1fa reassociate_bb ../../gcc/gcc/tree-ssa-reassoc.c:4325 0xc8b927 reassociate_bb ../../gcc/gcc/tree-ssa-reassoc.c:4482 0xc8b927 reassociate_bb ../../gcc/gcc/tree-ssa-reassoc.c:4482 0xc8e2db do_reassoc ../../gcc/gcc/tree-ssa-reassoc.c:4515 0xc8e2db execute_reassoc ../../gcc/gcc/tree-ssa-reassoc.c:4597 0xc8e2db execute ../../gcc/gcc/tree-ssa-reassoc.c:4639 Please submit a full bug report, with preprocessed source if appropriate. Please include the complete backtrace with any bug report. Looks related to PR58911.