aboutsummaryrefslogtreecommitdiff
path: root/gcc/ipa-devirt.c
diff options
context:
space:
mode:
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))
;