aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-devirt.c
diff options
context:
space:
mode:
authorJan Hubicka <hubicka@ucw.cz>2018-11-20 19:06:03 +0100
committerJan Hubicka <hubicka@gcc.gnu.org>2018-11-20 18:06:03 +0000
commit012b51cf21538e0695cbcc6b725f1140655c86b7 (patch)
tree98c92a2a0473ed1540cf5709e17d2b5aef56bcaf /gcc/ipa-devirt.c
parent5702bb9494497fb09aff5b7e52fb013723bfe423 (diff)
downloadgcc-012b51cf21538e0695cbcc6b725f1140655c86b7.zip
gcc-012b51cf21538e0695cbcc6b725f1140655c86b7.tar.gz
gcc-012b51cf21538e0695cbcc6b725f1140655c86b7.tar.bz2
ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
* ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums. * tree.c (build_array_type_1): Forward declare. (fld_type_variant_equal_p): Add INNER_TYPE parameter. (fld_type_variant): Likewise. (fld_simplified_types): New hash. (fld_process_array_type): New function. (fld_incomplete_type_of): Handle array and enumeration types. (fld_simplified_type): Handle simplification of arrays. (free_lang_data): Allocate and free simplified types hash. From-SVN: r266325
Diffstat (limited to 'gcc/ipa-devirt.c')
-rw-r--r--gcc/ipa-devirt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c
index cbc0eec..229eebc 100644
--- a/gcc/ipa-devirt.c
+++ b/gcc/ipa-devirt.c
@@ -1720,7 +1720,8 @@ add_type_duplicate (odr_type val, tree type)
else if (!COMPLETE_TYPE_P (val->type) && COMPLETE_TYPE_P (type))
{
prevail = true;
- build_bases = TYPE_BINFO (type);
+ if (TREE_CODE (type) == RECORD_TYPE)
+ build_bases = TYPE_BINFO (type);
}
else if (COMPLETE_TYPE_P (val->type) && !COMPLETE_TYPE_P (type))
;