This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[Patch, fortran] PR30003 - Expressions with side effects in array references
- From: Paul Thomas <paulthomas2 at wanadoo dot fr>
- To: Fortran List <fortran at gcc dot gnu dot org>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 05 Dec 2006 17:42:37 +0100
- Subject: [Patch, fortran] PR30003 - Expressions with side effects in array references
- References: <bug-30003-11549@http.gcc.gnu.org/bugzilla/> <20061205155728.25375.qmail@sourceware.org>
:ADDPATCH fortran:
With endorsements from the two Tobiases, I will take it that the patch
for PR30003, which is posted at
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30003
together wih a discussion of the problem, is OK'd for trunk and, in a
week or so, for 4.2.
Please find the ChangeLogs attached.
Thanks to both of you.
Paul
2006-12-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30003
* trans-array.c (gfc_trans_create_temp_array): Set the section
ends to zero.
(gfc_conv_array_transpose): Likewise.
(gfc_conv_section_startstride): Declare an expression for end,
set it from a the array reference and evaluate it for the info
structure. Zero the ends in the ss structure and set end, used
in the bounds check, from the info structure.
trans.h: Add and end array to the gfc_ss_info structure.
2006-12-05 Paul Thomas <pault@gcc.gnu.org>
PR fortran/30003
* gfortran.dg/allocatable_function_1.f90: Increase the number
of expected calls of free to 10; the lhs section reference is
now evaluated so there is another call to bar. Change the
comment appropriately.
* gfortran.dg/array_section_1.f90: New test.