This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/28849] New: Missed array shape violation with RESHAPE despite -fbounds-check
- From: "anlauf at gmx dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Aug 2006 20:39:24 -0000
- Subject: [Bug fortran/28849] New: Missed array shape violation with RESHAPE despite -fbounds-check
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The assignment of a RESHAPE()d array does not trigger
a run-time error with bounds-checking turned on.
% gfortran -O0 -g -fbounds-check gfcbug39_bounds_check.f90 && ./a.out
Assignments with correct shapes after RESHAPE...
a(:,1) = 1.000000
b(:,1) = 1.000000 2.000000
...and with wrong shape (should fail with bounds checking on)
a(:,1) = 1.000000
b(:,1) = 1.000000 2.000000
Must have missed an array bound violation after RESHAPE...
See the attached sample program for details.
Cheers,
-ha
--
Summary: Missed array shape violation with RESHAPE despite -
fbounds-check
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: anlauf at gmx dot de
GCC host triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28849