This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/31716] segfault with real array bounds



------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]