[Patch, Fortran] PR 38669 Array bounds violation for arguments of elemental subroutine
Mikael Morin
mikael.morin@tele2.fr
Sun Jan 4 01:27:00 GMT 2009
Hi all,
first, I join everybody to wish everybody a happy new year.
This patch fixes an array bounds violation with elemental arguments.
This is a regression.
The array bounds variables were used before they were assigned a value.
This is fixed by adding the offending code (dependency code) _after_ the
loop's pre code.
This patch also contains a fix for the fix for PR 38487 which was
supposed to only circumvent the warning, but was also changing the
return value.
As a bonus, it also fixes a function name in the ChangeLog.
Regression tested on x86_64-unknown-linux-gnu. Ok for trunk (and later
4.3?)?
Mikael
2009-01-03 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/35681
* ChangeLog: Fix function name.
PR fortran/38487
* dependency.c (gfc_check_argument_var_dependency):
Move the check for pointerness inside the if block
so that it doesn't affect the return value.
PR fortran/38669
* trans-stmt.c (gfc_trans_call):
Add the dependency code after the loop bounds calculation one.
2009-01-03 Mikael Morin <mikael.morin@tele2.fr>
PR fortran/38669
* gfortran.dg/elemental_dependency_3.f90: New test.
* gfortran.dg/elemental_subroutine_7.f90: New test.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pr38669_07.diff
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090104/393ce3cd/attachment.ksh>
More information about the Fortran
mailing list