diff options
Diffstat (limited to 'gcc/fortran/trans-common.c')
-rw-r--r-- | gcc/fortran/trans-common.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index 62a2e018210..844ac1d2674 100644 --- a/gcc/fortran/trans-common.c +++ b/gcc/fortran/trans-common.c @@ -1,5 +1,5 @@ /* Common block and equivalence list handling - Copyright (C) 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009 + Copyright (C) 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. Contributed by Canqun Yang <canqun@nudt.edu.cn> @@ -399,8 +399,11 @@ build_common_decl (gfc_common_head *com, tree union_type, bool is_init) if (strcmp (com->name, BLANK_COMMON_NAME)) gfc_warning ("Named COMMON block '%s' at %L shall be of the " "same size", com->name, &com->where); + DECL_SIZE (decl) = TYPE_SIZE (union_type); DECL_SIZE_UNIT (decl) = size; + DECL_MODE (decl) = TYPE_MODE (union_type); TREE_TYPE (decl) = union_type; + layout_decl (decl, 0); } } |