From: Jerry DeLisle Date: Sat, 19 Apr 2008 06:34:12 +0000 (+0000) Subject: re PR fortran/35724 (Compile time segmentation fault for CSHIFT with negative third... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c0c6ecc6fef374ff4dea99f42bc2e35d1ba03c6;p=gcc.git re PR fortran/35724 (Compile time segmentation fault for CSHIFT with negative third arg) 2008-04-18 Jerry DeLisle PR fortran/35724 * trans-common.c (create_common): Revert patch causing regression. From-SVN: r134464 --- 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 + + PR fortran/35724 + * trans-common.c (create_common): Revert patch causing regression. + 2008-04-16 Jerry DeLisle 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),