diff options
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-common.c | 5 |
2 files changed, 11 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index af4bf20d3f4..08a6b680330 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2010-02-25 Jakub Jelinek <jakub@redhat.com> + + PR debug/43166 + * trans-common.c (build_common_decl): Also update DECL_MODE, + and DECL_SIZE when encountering a larger common block and call + layout_decl. + 2010-02-24 Tobias Burnus <burnus@net-b.de> PR fortran/43042 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); } } |