aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r--gcc/c-decl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index eaef0a5..5839fc2 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -3383,7 +3383,7 @@ c_maybe_initialize_eh (void)
void
finish_decl (tree decl, tree init, tree asmspec_tree)
{
- tree type = TREE_TYPE (decl);
+ tree type;
int was_incomplete = (DECL_SIZE (decl) == 0);
const char *asmspec = 0;
@@ -3410,6 +3410,8 @@ finish_decl (tree decl, tree init, tree asmspec_tree)
|| TREE_CODE (decl) == FIELD_DECL))
objc_check_decl (decl);
+ type = TREE_TYPE (decl);
+
/* Deduce size of array from initialization, if not already known. */
if (TREE_CODE (type) == ARRAY_TYPE
&& TYPE_DOMAIN (type) == 0