diff options
author | Jakub Jelinek <jakub@redhat.com> | 2019-05-03 09:32:06 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2019-05-03 09:32:06 +0200 |
commit | d1700aa1407c188165eb8e06f40bf059a9b81b16 (patch) | |
tree | 3f7581bb88b4a988b3141445a774c624632f5e4d /gcc/ipa-devirt.c | |
parent | 061a799b8e9b66c59dd55bb11c1b132ea74ebb43 (diff) | |
download | gcc-d1700aa1407c188165eb8e06f40bf059a9b81b16.zip gcc-d1700aa1407c188165eb8e06f40bf059a9b81b16.tar.gz gcc-d1700aa1407c188165eb8e06f40bf059a9b81b16.tar.bz2 |
re PR tree-optimization/90303 (ICE in hash_odr_name with fastcall attribute starting with r267359)
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.
* g++.target/i386/pr90303.C: New test.
From-SVN: r270835
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r-- | gcc/ipa-devirt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index defa2ed..3e040e2 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -2020,7 +2020,7 @@ obj_type_ref_class (const_tree ref) 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; @@ -2042,7 +2042,7 @@ get_odr_type (tree type, bool insert) 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) |