This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/27786] New: Bad interaction between Cray pointer, assumed-size array and bounds checking
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 28 May 2006 13:52:23 -0000
- Subject: [Bug fortran/27786] New: Bad interaction between Cray pointer, assumed-size array and bounds checking
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This reduced testcase is originally from the testsuite
gfortran.dg/cray_pointers_2.f90. It generates an incorrect out-of-bounds error
message when run with bounds-checking enabled.
$ cat cray_pointers_2.f90
integer targ(2)
integer pte
pointer(ptr,pte(*))
ptr = loc(targ)
targ(2) = -1
print *, pte(2)
end
$ gfortran -fbounds-check -fcray-pointer cray_pointers_2.f90 && ./a.out
Fortran runtime error: Array reference out of bounds
--
Summary: Bad interaction between Cray pointer, assumed-size array
and bounds checking
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
OtherBugsDependingO 27766
nThis:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27786