[Patch, fortran] PR32962 - b = conjg(transpose(a)) is erroneous if b is an allocatable array

FX Coudert fxcoudert@gmail.com
Sun Aug 12 19:31:00 GMT 2007


:REVIEWMAIL:

> 2007-08-12  Paul Thomas  <pault@gcc.gnu.org>
>
>    PR fortran/32962
>    * trans-array.c (gfc_conv_array_transpose): Set the offset
>    of the destination to zero if the loop is zero based.

OK, except for:

> *************** gfc_conv_loop_setup (gfc_loopinfo * loop
> *** 3220,3226 ****
>   	  /* Criteria for choosing a loop specifier (most important first):
>   	     doesn't need realloc
>   	     stride of one
> ! 	     known stride
>   	     known lower bound
>   	     known upper bound
>   	   */
> --- 3225,3231 ----
>   	  /* Criteria for choosing a loop specifier (most important first):
>   	     doesn't need realloc
>   	     stride of one
> ! 	     known stride (preferably a variable)
>   	     known lower bound
>   	     known upper bound
>   	   */

Do you want this, or is this, like the following, part of another patch?

> *************** gfc_conv_loop_setup (gfc_loopinfo * loop
> *** 3232,3237 ****
> --- 3237,3248 ----
>   	  else if (INTEGER_CST_P (info->stride[n])
>   		   && !INTEGER_CST_P (specinfo->stride[n]))
>   	    loopspec[n] = ss;
> + #if 0
> + 	  else if (INTEGER_CST_P (info->stride[n])
> + 		   && ss->type != EXPR_FUNCTION
> + 		   && loopspec[n]->expr->expr_type == EXPR_FUNCTION)
> + 	    loopspec[n] = ss;
> + #endif
>   	  else if (INTEGER_CST_P (info->start[n])
>   		   && !INTEGER_CST_P (specinfo->start[n]))
>   	    loopspec[n] = ss;


Thanks!
FX



More information about the Fortran mailing list