[Patch, fortran] PR31726 - minloc/maxloc: wrong results with empty array (F2003 only)

Tobias Burnus burnus@net-b.de
Sat Jun 23 13:15:00 GMT 2007


Paul Richard Thomas wrote:
> Index: /svn/trunk/gcc/fortran/trans-intrinsic.c
> +  /* Remember where we are.  An offset must be added to the loop
> +  gfc_add_modify_expr (&block, offset, tmp);
>   
How about using &loop.pre instead of &block? This will put the offset
before the "while(1)" loop instead of in the loop:
            while (1)
              {
                if (S.5 > 1) goto L.1;
                offset.2 = 1;
This save some µs time during -O0 run time and during -O compiles ;-)

OK for the trunk.

Tobias



More information about the Fortran mailing list