This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/49416] New: wrong -fbounds-check with 2 dimensional arrays reshape
- From: "koval.peter at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Jun 2011 08:33:19 +0000
- Subject: [Bug fortran/49416] New: wrong -fbounds-check with 2 dimensional arrays reshape
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49416
Summary: wrong -fbounds-check with 2 dimensional arrays reshape
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: koval.peter@gmail.com
The bug arises when -fbounds-check option and reshape intrinsic are used.
gfortran --version
GNU Fortran (Ubuntu 4.4.3-4ubuntu5) 4.4.3
Copyright (C) 2010 Free Software Foundation, Inc.
The program below results in a runtime error (when compiled with -fbounds-check
option), although it runs normally without -fbounds-check option.
program check_reshape
implicit none
real(8), allocatable :: a(:,:)
allocate(a(2,-2:2))
write(6,*) reshape(a, (/ 10 /))
end program !check_reshape