This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70029] [6 Regression] ICE with C++11 and -flto
- From: "hubicka at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 06 Apr 2016 16:58:13 +0000
- Subject: [Bug c++/70029] [6 Regression] ICE with C++11 and -flto
- Auto-submitted: auto-generated
- References: <bug-70029-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70029
--- Comment #7 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Hmm, both options sounds quite involved. Perhaps for stage4 we can simply drop
the sanity check and add yet another FIXME to the verifier? Alias.c is
relatively robust about walking to main variants so I can't think of wrong code
issue caused by this.
Honza
Index: tree.c
===================================================================
--- tree.c (revision 234761)
+++ tree.c (working copy)
@@ -13584,7 +13584,8 @@ verify_type (const_tree t)
debug_tree (ct);
error_found = true;
}
- if (TYPE_MAIN_VARIANT (t) == t && ct && TYPE_MAIN_VARIANT (ct) != ct)
+ /* FIXME: this is volated by C++ frontend as discussed in PR70029. */
+ if (TYPE_MAIN_VARIANT (t) == t && ct && TYPE_MAIN_VARIANT (ct) != ct && 0)
{
error ("TYPE_CANONICAL of main variant is not main variant");
debug_tree (ct);
Index: testsuite/g++.dg/torture/pr70029.C
===================================================================
--- testsuite/g++.dg/torture/pr70029.C (revision 0)
+++ testsuite/g++.dg/torture/pr70029.C (working copy)
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c++11 -g -flto" } */
+/* { dg-require-effective-target lto } */
+struct A
+{
+ A();
+ int foo() && __attribute__ ((__warn_unused_result__)) { return 0; }
+};
+
+A a;
+