[Patch, fortran] PR35946 and PR35947 - [4.3, 4.4 regression] wrong results with array constructor as arguments
Paul Richard Thomas
paul.richard.thomas@gmail.com
Sun Apr 20 04:56:00 GMT 2008
:ADDPATCH fortran:
The need for this patch comes about because the scalarizer is now,
sometimes, not zero basing loops containing variable array
constructors. The consequence of this is that the dimensions and
bounds of the temporary get messed up and that the references to it
are not offset correctly. I tried to fix this in
gfc_trans_create_temp_array but so many regressions were caused that I
could not see how to do it. Whilst the attached patch is a bit
inelegant, it does the job. Note that only 1D arrays are affected so
there is no need to work out complicated offsets.
Bootstrapped and regtested on x86_ia64 - OK for trunk and 4.3?
If it is OK with everybody, I will commit this tonight. I am away for
a bit and might find it difficult to do for a couple of weeks.
Paul
2008-04-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35946
PR fortran/35947
* trans_array.c (gfc_trans_array_constructor): Temporarily
realign loop, if loop->from is not zero, before creating
the temporary array and provide an offset.
2008-04-19 Paul Thomas <pault@gcc.gnu.org>
PR fortran/35946
PR fortran/35947
* gfortran.dg/array_constructor_23.f: New test.
--
The knack of flying is learning how to throw yourself at the ground and miss.
--Hitchhikers Guide to the Galaxy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr35946.diff
Type: text/x-patch
Size: 3140 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20080420/71efb0fb/attachment.bin>
More information about the Fortran
mailing list