https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78373
Bug ID: 78373 Summary: [7 Regression] error: constant not recomputed when ADDR_EXPR changed Product: gcc Version: 7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: trippels at gcc dot gnu.org Target Milestone: --- markus@x4 /tmp % cat xray.ii struct A { static A singleton; }; struct B { void m_fn2(); virtual int m_fn1(); }; struct D : B { static int m_fn3(int, int, int, A) { D &self = singleton; self.m_fn2(); } static D singleton; }; template <typename, typename> struct C { bool m_fn4() const; }; template <typename Base, typename Traits> bool C<Base, Traits>::m_fn4() const { Traits::m_fn3(0, 0, 0, Base::singleton); } template struct C<A, D>; markus@x4 /tmp % g++ -c xray.ii xray.ii: In static member function ‘static int D::m_fn3(int, int, int, A)’: xray.ii:19:24: error: constant not recomputed when ADDR_EXPR changed template struct C<A, D>; ^ &self_2->D.2295 xray.ii:11:15: note: in statement self.m_fn2(); ~~~~~~~~~~^~ _1 = &self_2->D.2295; xray.ii:19:24: internal compiler error: verify_gimple failed template struct C<A, D>; ^ 0xd93a35 verify_gimple_in_cfg(function*, bool) ../../gcc/gcc/tree-cfg.c:5258 0xc79d26 execute_function_todo ../../gcc/gcc/passes.c:1965 0xc7adcb execute_todo ../../gcc/gcc/passes.c:2015