This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/67802] ICE on initializing character with wrong len type
- 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: Thu, 01 Oct 2015 17:42:16 +0000
- Subject: [Bug fortran/67802] ICE on initializing character with wrong len type
- Auto-submitted: auto-generated
- References: <bug-67802-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67802
--- Comment #1 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Whereas, without initialization relevant errors are detected :
$ cat za1.f90
program p
character(1.) :: c1
character(1d1) :: c2
character((0.,1.)) :: c3
character(.true.) :: c4
end
$ cat zp1.f90
program p
real, parameter :: n1 = 1.
double precision, parameter :: n2 = 1d1
complex, parameter :: n3 = (0.,1.)
logical, parameter :: n4 = .true.
character(n1) :: c1
character(n2) :: c2
character(n3) :: c3
character(n4) :: c4
end
$ gfortran -g -O0 -Wall -fcheck=all -fno-frontend-optimize zp1.f90
zp1.f90:9:13:
character(n4) :: c4
1
Error: Expression at (1) must be of INTEGER type, found LOGICAL
zp1.f90:8:13:
character(n3) :: c3
1
Error: Expression at (1) must be of INTEGER type, found COMPLEX
zp1.f90:7:13:
character(n2) :: c2
1
Error: Expression at (1) must be of INTEGER type, found REAL
zp1.f90:6:13:
character(n1) :: c1
1
Error: Expression at (1) must be of INTEGER type, found REAL