This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ipa/69241] [6 Regression] ICE with noreturn and function that return non-POD
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 03 Feb 2016 10:33:45 +0000
- Subject: [Bug ipa/69241] [6 Regression] ICE with noreturn and function that return non-POD
- Auto-submitted: auto-generated
- References: <bug-69241-4 at http dot gcc dot gnu dot org/bugzilla/>
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;
}