PR c++/70029
* tree.c (verify_type): Disable the canonical type of main variant
check.
* g++.dg/torture/pr70029.C: New test.
Co-Authored-By: Jan Hubicka <hubicka@ucw.cz>
From-SVN: r234979
+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.
+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
--- /dev/null
+// 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;
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);