re PR fortran/27786 ([4.1 only] Bad interaction between Cray pointer, assumed-size array and bounds checking)

* cray_pointers_2.f90: Add -fbounds-check compile flag.

	PR fortran/27786
	* trans-array.c (gfc_conv_array_ref): Eliminate bounds checking
	for assumed-size Cray pointees.

From-SVN: r114495
This commit is contained in:
Asher Langton 2006-06-08 21:00:26 +00:00 committed by Asher Langton
parent 118ed72a74
commit f6cf0340b9
4 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2006-06-08 Asher Langton <langton2@llnl.gov>
PR fortran/27786
* trans-array.c (gfc_conv_array_ref): Eliminate bounds checking
for assumed-size Cray pointees.
2006-06-08 Steven G. Kargl <kargls@comcat.net>
* intrinsic.c (add_subroutine): Make make_noreturn() conditional on

View File

@ -1964,7 +1964,8 @@ gfc_conv_array_ref (gfc_se * se, gfc_array_ref * ar, gfc_symbol * sym,
gfc_add_block_to_block (&se->pre, &indexse.pre);
if (flag_bounds_check &&
(ar->as->type != AS_ASSUMED_SIZE || n < ar->dimen - 1))
((ar->as->type != AS_ASSUMED_SIZE && !ar->as->cp_was_assumed)
|| n < ar->dimen - 1))
{
/* Check array bounds. */
tree cond;

View File

@ -1,3 +1,8 @@
2006-06-08 Asher Langton <langton2@llnl.gov>
PR fortran/27786
* cray_pointers_2.f90: Add -fbounds-check compile flag.
2006-06-08 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR target/27421

View File

@ -1,5 +1,5 @@
! { dg-do run }
! { dg-options "-fcray-pointer" }
! { dg-options "-fcray-pointer -fbounds-check" }
! Series of routines for testing a Cray pointer implementation
program craytest
common /errors/errors(400)