[Bug fortran/91960] ICE: backend decl for module variable 'j' already exists
anlauf at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Dec 22 21:16:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91960
anlauf at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2019-12-22
CC| |anlauf at gcc dot gnu.org
Ever confirmed|0 |1
--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.
We fail to detect that j is used in an initialization expression.
As a consequence, we end up with junk later on. E.g.:
module m
implicit none
integer :: i, j
integer, parameter :: a(3) = [1, 2, 3]
integer, parameter :: c = a(j)
integer :: d = c
end
produces:
pr91960b.f90:6:30:
6 | integer :: d = c
| 1
Error: non-constant initialization expression at (1)
More information about the Gcc-bugs
mailing list