[Bug fortran/36091] false positive in bounds checking with forall
mikael dot morin at tele2 dot fr
gcc-bugzilla@gcc.gnu.org
Wed Oct 22 12:51:00 GMT 2008
------- 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
More information about the Gcc-bugs
mailing list