------- Comment #1 from mikael dot morin at tele2 dot fr 2008-10-22 12:49 ------- Created an attachment (id=16527) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16527&action=view) patch solving the problem
This patch keeps the original array descriptor from gfc_conv_subref_array_arg to gfc_trans_create_temp_array so that the temporary generated can have the same bounds as the original, which is needed for bounds checking. However I'm wondering if this is the good way to solve the problem. I believe that the code generated for this: forall (i=j:k) p(p(i)) = 1 ! bounds checking problem should not be much different than the code generated for that: p(p(j:k)) = 1 ! no bounds checking problem -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36091