diff options
author | Jason Merrill <jason@redhat.com> | 2020-09-18 15:34:24 -0400 |
---|---|---|
committer | Jason Merrill <jason@redhat.com> | 2020-09-18 15:35:26 -0400 |
commit | e1a1808cd19afd93fc4134fbd8376346d05bdba8 (patch) | |
tree | 82c84c04f165863d7924b878c40856317b2046f9 | |
parent | 04dc198ce5508b2329c83cda7c0cd9bce4ed83bb (diff) | |
download | gcc-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.
-rw-r--r-- | gcc/cp/decl.c | 3 |
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. */ |