diff mbox

[Fortran] Fix PR fortran/68147, temporaries for allocatable strings

Message ID 56C76410.30405@netcologne.de
State New
Headers show

Commit Message

Thomas Koenig Feb. 19, 2016, 6:50 p.m. UTC
Hello world,

in the fix for PR 47674, there was a piece of unnecessary
code which meant that allocatable string assignments did
not get their temporary within IF statements (and others).

This patch is really simple and obvious.  If we weren't in
tstage 4, I would simply commit it.

Because allocatable strings are a major convenience for
users, I would still like to commit this to trunk and
to the affected branches.

So, OK for these branches?

Regards

	Thomas

2016-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/68147
         PR fortran/47674
         * frontend-passes.c (realloc_string_callbac): Don't set
         walk_subtrees.

2016-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>

         PR fortran/68147
         PR fortran/47674
         * gfortran.dg/realloc_on_assign_26.f90:  New test case.

Comments

Thomas Koenig Feb. 28, 2016, 11:39 a.m. UTC | #1
I wrote:

> So, OK for these branches?

Patch at

https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01364.html

Regards

      Thomas
>
> 2016-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
>
>          PR fortran/68147
>          PR fortran/47674
>          * frontend-passes.c (realloc_string_callbac): Don't set
>          walk_subtrees.
>
> 2016-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
>
>          PR fortran/68147
>          PR fortran/47674
>          * gfortran.dg/realloc_on_assign_26.f90:  New test case.
Jerry DeLisle Feb. 28, 2016, 6:40 p.m. UTC | #2
On 02/28/2016 03:39 AM, Thomas Koenig wrote:
> I wrote:
> 
>> So, OK for these branches?
> 
> Patch at
> 
> https://gcc.gnu.org/ml/gcc-patches/2016-02/msg01364.html
> 
> Regards
> 
>      Thomas
>>
>> 2016-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
>>
>>          PR fortran/68147
>>          PR fortran/47674
>>          * frontend-passes.c (realloc_string_callbac): Don't set
>>          walk_subtrees.
>>
>> 2016-02-18  Thomas Koenig  <tkoenig@gcc.gnu.org>
>>
>>          PR fortran/68147
>>          PR fortran/47674
>>          * gfortran.dg/realloc_on_assign_26.f90:  New test case.
> 
> 

Fix spelling in ChangeLog of "...callback" and OK

Jerry
diff mbox

Patch

Index: frontend-passes.c
===================================================================
--- frontend-passes.c	(Revision 233474)
+++ frontend-passes.c	(Arbeitskopie)
@@ -153,7 +153,7 @@  gfc_run_passes (gfc_namespace *ns)
  */
 
 static int
-realloc_string_callback (gfc_code **c, int *walk_subtrees,
+realloc_string_callback (gfc_code **c, int *walk_subtrees ATTRIBUTE_UNUSED,
 			 void *data ATTRIBUTE_UNUSED)
 {
   gfc_expr *expr1, *expr2;
@@ -160,7 +160,6 @@  static int
   gfc_code *co = *c;
   gfc_expr *n;
 
-  *walk_subtrees = 0;
   if (co->op != EXEC_ASSIGN)
     return 0;