This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/29572] New: Bounds check should check size of array: d(1:1,1:1) = a(1:4,1:4)
- From: "tobias dot burnus at physik dot fu-berlin dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 23 Oct 2006 20:14:28 -0000
- Subject: [Bug fortran/29572] New: Bounds check should check size of array: d(1:1,1:1) = a(1:4,1:4)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In the following one assignes a 4x4 array to a 1x1 array. (Reason: transpose()
at the wrong place.)
Expected: This is detected at run time using -fbounds-check
Current result: Crash.
program mat
implicit none
complex, allocatable :: a(:,:),b(:,:)
complex :: d(1,1)
allocate(a(4,1),b(4,1))
a = cmplx(0.5,2.0)
b = cmplx(2.0,0.5)
d = matmul(a,transpose(b))
deallocate(a,b)
end program mat
--
Summary: Bounds check should check size of array: d(1:1,1:1) =
a(1:4,1:4)
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tobias dot burnus at physik dot fu-berlin dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29572