summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-19 06:34:12 +0000
committerjvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4>2008-04-19 06:34:12 +0000
commitfab96baeae7a2e5279c7290295589c14ef719855 (patch)
treeeb4f14425420af70a72fcb48a976dd6ad36a83b1
parent59e2f07cb6d77b4c55ceb549b982fa9fe3784b46 (diff)
downloadgcc-fab96baeae7a2e5279c7290295589c14ef719855.tar.gz
2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/35724 * trans-common.c (create_common): Revert patch causing regression. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@134464 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/trans-common.c7
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index c8ec87acdb1..1b9b29554b2 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,8 @@
+2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/35724
+ * trans-common.c (create_common): Revert patch causing regression.
+
2008-04-16 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/35724
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c
index f7042cb29d6..d7e3e645965 100644
--- a/gcc/fortran/trans-common.c
+++ b/gcc/fortran/trans-common.c
@@ -686,8 +686,11 @@ create_common (gfc_common_head *com, segment_info *head, bool saw_equiv)
TREE_ADDRESSABLE (var_decl) = 1;
/* This is a fake variable just for debugging purposes. */
TREE_ASM_WRITTEN (var_decl) = 1;
-
- gfc_add_decl_to_function (var_decl);
+
+ if (com)
+ var_decl = pushdecl_top_level (var_decl);
+ else
+ gfc_add_decl_to_function (var_decl);
SET_DECL_VALUE_EXPR (var_decl,
fold_build3 (COMPONENT_REF, TREE_TYPE (s->field),