From: Jason Merrill Date: Fri, 18 Sep 2020 19:34:24 +0000 (-0400) Subject: c++: Fix bootstrap failure. [PR97118] X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e1a1808cd19afd93fc4134fbd8376346d05bdba8;p=gcc.git 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. --- diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 746ed101fef..13f065d5058 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. */