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: [email protected]
ReportedBy: [email protected]
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