[Bug fortran/49416] New: wrong -fbounds-check with 2 dimensional arrays reshape
koval.peter at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jun 15 08:33:00 GMT 2011
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
More information about the Gcc-bugs
mailing list