diff options
author | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-04-19 06:34:12 +0000 |
---|---|---|
committer | Jerry DeLisle <jvdelisle@gcc.gnu.org> | 2008-04-19 06:34:12 +0000 |
commit | 6c0c6ecc6fef374ff4dea99f42bc2e35d1ba03c6 (patch) | |
tree | eb4f14425420af70a72fcb48a976dd6ad36a83b1 | |
parent | 22d81154e2f8e71042d8dd754ddf7c2346e021e7 (diff) | |
download | gcc-6c0c6ecc6fef374ff4dea99f42bc2e35d1ba03c6.zip gcc-6c0c6ecc6fef374ff4dea99f42bc2e35d1ba03c6.tar.gz gcc-6c0c6ecc6fef374ff4dea99f42bc2e35d1ba03c6.tar.bz2 |
re PR fortran/35724 (Compile time segmentation fault for CSHIFT with negative third arg)
2008-04-18 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/35724
* trans-common.c (create_common): Revert patch causing regression.
From-SVN: r134464
-rw-r--r-- | gcc/fortran/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/fortran/trans-common.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index c8ec87a..1b9b295 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 f7042cb..d7e3e64 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), |