[patch, libfortran] Fix PR 31196

FX Coudert fxcoudert@gmail.com
Sun Mar 25 07:42:00 GMT 2007


:REVIEWMAIL:

> this one-liner fixes PR 31196, where reshape of a
> transposed array led to silent wrong results.

Yes, this brings the code in intrinsics/reshape_generic.c in line  
with m4/reshape.m4. What's amusing is that this difference appears to  
go back to the initial merge of code from tree-ssa to mainline. By  
the way, did you audit these two files for other differences? (I try  
to keep them in sync when I change one, but I'm not sure I ever gave  
it a global look.)

> 2007-03-24  Thomas Koenig  <tkoenig@gcc.gnu.org>
>
>         * intrinsic/reshape_generic.c (reshape_internal):  Increment
>         correct variable.

This is OK for mainline.

As for 4.2: it's not a regression, but it's a silent wrong-code bug,  
and those are always nasty; it's not in a very exposed part of the  
library, though (character transpose is probably not the most used  
feature of gfortran), and it's not risky at all, since it's both very  
short and known to be correctly working in m4/reshape.m4 for years.  
So, all considered, I think it's worthy to have in 4.2. I'm not sure  
whether a mail to Mark M. is needed; if, when you want to commit, the  
4.2 branch is still documented as "stage 3", I think maintainer  
approval is enough. But please let at least a few days for others to  
object/argue before commiting to 4.2.

Thanks,
FX



More information about the Fortran mailing list