This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/67885] ICE on using parameter array in block
- From: "gerhard dot steinmetz dot fortran at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 12 Oct 2015 16:34:50 +0000
- Subject: [Bug fortran/67885] ICE on using parameter array in block
- Auto-submitted: auto-generated
- References: <bug-67885-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67885
--- Comment #4 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Deleting the dimension from parameter a (making it scalar)
lets examples z1.f90 and z5.f90 compile and run fine.
$ cat y1.f90
program p
block
real, parameter :: a = 1.0
real :: x(2)
x = a
print *, x
block
print *, x
end block
print *, x
end block
end
$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize y1.f90
$ a.out
1.00000000 1.00000000
1.00000000 1.00000000
1.00000000 1.00000000
---
$ cat y5.f90
program p
block
real, parameter :: a = 1.0
real :: x(2)
x = a
print *, x
end block
end
$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize y5.f90
$ a.out
1.00000000 1.00000000