This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31716] segfault with real array bounds
- From: "dfranke at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 May 2007 07:50:29 -0000
- Subject: [Bug fortran/31716] segfault with real array bounds
- References: <bug-31716-10391@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #8 from dfranke at gcc dot gnu dot org 2007-05-18 08:50 -------
Jerry, the patch eliminates the ICE and regtests cleanly.
$> cat pr31716.f90
program main
real, parameter :: n = 1024, iter=1000
real, dimension(n) :: num1,num2
call random_number(num1)
do i=1,iter
num2 = num1**2
end do
end program main
$> gfortran-svn -Wall pr31760.f90
pr31760.f90:3.18:
real, dimension(n) :: num1,num2
1
Error: Expression at (1) must be of INTEGER type
pr31760.f90:3.33:
real, dimension(n) :: num1,num2
1
Error: The module or main program array 'num2' at (1) must have constant shape
pr31760.f90:3.18:
real, dimension(n) :: num1,num2
1
Error: Expression at (1) must be of INTEGER type
pr31760.f90:3.28:
real, dimension(n) :: num1,num2
1
Error: The module or main program array 'num1' at (1) must have constant shape
The messages "must have constant shape" puzzles me as N is a PARAMETER?!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31716