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/67885] ICE on using parameter array in block


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


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