+2019-05-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/90303
+ * ipa-devirt.c (obj_type_ref_class, get_odr_type): Don't use
+ TYPE_CANONICAL for TYPE_STRUCTURAL_EQUALITY_P types in !in_lto_p mode.
+
2019-05-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/89698
ref = TREE_VALUE (TYPE_ARG_TYPES (ref));
gcc_checking_assert (TREE_CODE (ref) == POINTER_TYPE);
tree ret = TREE_TYPE (ref);
- if (!in_lto_p)
+ if (!in_lto_p && !TYPE_STRUCTURAL_EQUALITY_P (ret))
ret = TYPE_CANONICAL (ret);
else
ret = get_odr_type (ret)->type;
int base_id = -1;
type = TYPE_MAIN_VARIANT (type);
- if (!in_lto_p)
+ if (!in_lto_p && !TYPE_STRUCTURAL_EQUALITY_P (type))
type = TYPE_CANONICAL (type);
gcc_checking_assert (can_be_name_hashed_p (type)
+2019-05-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/90303
+ * g++.target/i386/pr90303.C: New test.
+
2019-05-03 Richard Biener <rguenther@suse.de>
PR tree-optimization/89698
--- /dev/null
+// PR tree-optimization/90303
+// { dg-do compile { target ia32 } }
+// { dg-additional-options "-O2" }
+
+struct A { virtual void foo (); };
+template <class> class B : A {};
+typedef void (__attribute__((fastcall)) F) ();
+B<F> e;