This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ipa/69241] [6 Regression] ICE with noreturn and function that return non-POD


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

--- Comment #18 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
Here is Jakub's testcase. It it shorter and nicer than that from comment1.

struct A { virtual void m1 (); };
struct C : A { void m1 () { m1 (); } };
template <class T> struct B
{
  T *t;
  B (T *x) : t (x) { if (t) t->m1 (); }
  B (const B &);
};
struct D : public C {};
struct F : public D
{
  virtual B<D> m2 ();
  virtual B<D> m3 ();
  int m4 ();
};
struct G : F
{
  B<D> m2 ();
  B<D> m3 ();
};
B<D> G::m2 ()
{
  if (m4 () == 0) return this;
  return 0;
}
B<D> G::m3 ()
{
  if (m4 () == 0) return this;
  return 0;
}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]