2019-11-29 Martin Liska <mliska@suse.cz>
PR lto/91574
* ipa-devirt.c (types_same_for_odr): Check for existence
of TYPE_NAMEs first.
2019-11-29 Martin Liska <mliska@suse.cz>
PR lto/91574
* g++.dg/lto/pr91574_0.C: New test.
From-SVN: r278829
+2019-11-29 Martin Liska <mliska@suse.cz>
+
+ PR lto/91574
+ * ipa-devirt.c (types_same_for_odr): Check for existence
+ of TYPE_NAMEs first.
+
2019-11-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/92704
|| (type_with_linkage_p (type2) && type_in_anonymous_namespace_p (type2)))
return false;
+ /* If both type has mangled defined check if they are same.
+ Watch for anonymous types which are all mangled as "<anon">. */
+ if (!type_with_linkage_p (type1) || !type_with_linkage_p (type2))
+ return false;
+ if (type_in_anonymous_namespace_p (type1)
+ || type_in_anonymous_namespace_p (type2))
+ return false;
return (DECL_ASSEMBLER_NAME (TYPE_NAME (type1))
== DECL_ASSEMBLER_NAME (TYPE_NAME (type2)));
}
+2019-11-29 Martin Liska <mliska@suse.cz>
+
+ PR lto/91574
+ * g++.dg/lto/pr91574_0.C: New test.
+
2019-11-29 Richard Biener <rguenther@suse.de>
PR tree-optimization/92704
--- /dev/null
+// PR lto/91574
+// { dg-lto-do link }
+// { dg-lto-options { { -fPIC -flto -O2 } } }
+// { dg-require-effective-target shared }
+// { dg-require-effective-target fpic }
+// { dg-extra-ld-options "-shared" }
+
+class A
+{
+public:
+ virtual ~A ();
+ A (A &);
+ virtual unsigned m_fn1 () const;
+};
+class B : A
+{
+ unsigned m_fn1 () const;
+};
+void
+fn1 (B p1)
+{
+ B a[]{p1, p1};
+}