[Bug fortran/37903] [4.3/4.4 Regression] wrong-code for complicated vector subscripts
mikael dot morin at tele2 dot fr
gcc-bugzilla@gcc.gnu.org
Tue Oct 28 12:22:00 GMT 2008
------- Comment #7 from mikael dot morin at tele2 dot fr 2008-10-28 12:21 -------
This is happening because
(1) gfc_trans_constant_array_constructor sets loop->temp_dim to 1.
(2) gfc_conv_loop_setup choses the last ss whose shape is known (that of i).
(3) gfc_conv_loop_setup sets loop bounds (-1->1) according to the chosen ss
(i).
(4) gfc_trans_create_temp_array conditionally resets the loop bounds (if n >=
loop->temp_dim).
(5) gfc_trans_create_temp_array later assumes that the loop starts at zero.
(2) explains why it works with y(i+(/1,1,1/)) but not with y((/1,1,1/)+i)
My patch in comment #3 changes the "last ss" to "first ss" and of course it
doesn't work as was said in comment #6
I have two fixes almost ready.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37903
More information about the Gcc-bugs
mailing list