aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2020-09-18 15:34:24 -0400
committerJason Merrill <jason@redhat.com>2020-09-18 15:35:26 -0400
commite1a1808cd19afd93fc4134fbd8376346d05bdba8 (patch)
tree82c84c04f165863d7924b878c40856317b2046f9 /gcc
parent04dc198ce5508b2329c83cda7c0cd9bce4ed83bb (diff)
downloadgcc-e1a1808cd19afd93fc4134fbd8376346d05bdba8.zip
gcc-e1a1808cd19afd93fc4134fbd8376346d05bdba8.tar.gz
gcc-e1a1808cd19afd93fc4134fbd8376346d05bdba8.tar.bz2
c++: Fix bootstrap failure. [PR97118]
gcc/cp/ChangeLog: PR bootstrap/97118 * decl.c (complete_vars): Only call layout_var_decl if completing the type succeeded.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/decl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 746ed10..13f065d 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -17463,7 +17463,8 @@ complete_vars (tree type)
/* Complete the type of the variable. */
complete_type (type);
cp_apply_type_quals_to_decl (cp_type_quals (type), var);
- layout_var_decl (var);
+ if (COMPLETE_TYPE_P (type))
+ layout_var_decl (var);
}
/* Remove this entry from the list. */