diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-02-25 10:50:24 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-02-25 10:50:24 +0000 |
commit | 5d713e67a59aaff7ca333177fd088f5482d9439d (patch) | |
tree | 8c563f765e4c4c2d824bc55f8a32342fd34a9066 /gcc/fortran/trans-common.c | |
parent | 406aed5db7dd809344bc80fc27444540f4d9ad73 (diff) | |
download | gcc-5d713e67a59aaff7ca333177fd088f5482d9439d.tar.gz |
PR debug/43166
* cfgexpand.c (expand_debug_expr) <case VAR_DECL>: If mode is
BLKmode, assert op0 is a MEM and just adjust its mode.
* trans-common.c (build_common_decl): Also update DECL_MODE,
and DECL_SIZE when encountering a larger common block and call
layout_decl.
* gfortran.dg/debug/pr43166.f: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157063 138bc75d-0d04-0410-961f-82ee72b054a4
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); } } |