aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/testsuite/ChangeLog6
-rw-r--r--gcc/testsuite/g++.dg/torture/pr70029.C12
-rw-r--r--gcc/tree.c4
4 files changed, 28 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e56d15b..c4a0759 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2016-04-14 Marek Polacek <polacek@redhat.com>
+ Jan Hubicka <hubicka@ucw.cz>
+
+ PR c++/70029
+ * tree.c (verify_type): Disable the canonical type of main variant
+ check.
+
2016-04-14 Jason Merrill <jason@redhat.com>
* cfgexpand.c, expr.c: Revert previous change.
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index b7c5d3c..9cd0c6c 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2016-04-14 Marek Polacek <polacek@redhat.com>
+ Jan Hubicka <hubicka@ucw.cz>
+
+ PR c++/70029
+ * g++.dg/torture/pr70029.C: New test.
+
2016-04-14 Martin Sebor <msebor@redhat.com>
* g++.dg/cpp1y/vla11.C: Avoid using attribute aligned to increase
diff --git a/gcc/testsuite/g++.dg/torture/pr70029.C b/gcc/testsuite/g++.dg/torture/pr70029.C
new file mode 100644
index 0000000..9592f0c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr70029.C
@@ -0,0 +1,12 @@
+// PR c++/70029
+// { 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;
diff --git a/gcc/tree.c b/gcc/tree.c
index ed28429..c64d720 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -13584,7 +13584,9 @@ 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 violated by the C++ FE as discussed in PR70029, when
+ FUNCTION_*_QUALIFIED flags are set. */
+ if (0 && TYPE_MAIN_VARIANT (t) == t && ct && TYPE_MAIN_VARIANT (ct) != ct)
{
error ("TYPE_CANONICAL of main variant is not main variant");
debug_tree (ct);