diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-11 22:44:23 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-04-11 22:44:23 +0000 |
commit | 59e226b0438867b781db51579623e35fdc2bf4eb (patch) | |
tree | a01ada3c6afd82cc7fff3981f62928ada47eadea /gcc/expr.c | |
parent | cfafa1e9dd48cc98ca57b1c4e2e7ed01bec381e9 (diff) | |
download | gcc-59e226b0438867b781db51579623e35fdc2bf4eb.tar.gz |
PR c++/10202
* expr.c (expand_expr): Use COMPLETE_OR_UNBOUND_ARRAY_TYPE_P
not COMPLETE_TYPE_P for re-invoking layout_decl.
* g++.dg/expr/incomplete1.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65484 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expr.c')
-rw-r--r-- | gcc/expr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/expr.c b/gcc/expr.c index caf35cdaf49..ad8993d3a0e 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -6712,7 +6712,8 @@ expand_expr (exp, target, tmode, modifier) case VAR_DECL: /* If a static var's type was incomplete when the decl was written, but the type is complete now, lay out the decl now. */ - if (DECL_SIZE (exp) == 0 && COMPLETE_TYPE_P (TREE_TYPE (exp)) + if (DECL_SIZE (exp) == 0 + && COMPLETE_OR_UNBOUND_ARRAY_TYPE_P (TREE_TYPE (exp)) && (TREE_STATIC (exp) || DECL_EXTERNAL (exp))) layout_decl (exp, 0); |