https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61207

Matthias Klose <doko at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
                 CC|                            |doko at gcc dot gnu.org
      Known to work|                            |4.8.4, 5.0
            Version|4.9.0                       |4.9.2
            Summary|Win64 gcc 4.9.0: ICE at -Os |[4.9 Regression] Win64 gcc
                   |compiling some C++ code     |4.9.0: ICE in in
                   |                            |expand_expr_addr_expr_1 at
                   |                            |-Os compiling some C++ code
      Known to fail|                            |4.9.2

--- Comment #6 from Matthias Klose <doko at gcc dot gnu.org> ---
at least on arm-linux-gnueabihf, this is a regression in 4.9 (seen with -Os and
-O3), works on the trunk.

$ g++ -c -O3 moc_workplane.ii 
moc_workplane.ii: In member function 'virtual A
C<int>::_ZTv0_n12_NK1CIiE5m_fn1Ev() const':
moc_workplane.ii:8:45: internal compiler error: in expand_expr_addr_expr_1, at
expr.c:7634
 template <typename> class C : virtual B { A m_fn1() const; };
                                             ^
Please submit a full bug report,
with preprocessed source if appropriate.

$ cat moc_workplane.ii 
class A {
  float xp;
  float yp;
};
class B {
  virtual A m_fn1() const;
};
template <typename> class C : virtual B { A m_fn1() const; };
class D : C<int> {
  virtual const int *m_fn2() const;
};
template <typename T> A C<T>::m_fn1() const { return A(); }
const int *D::m_fn2() const {}

Reply via email to