[Bug fortran/88467] Silently accepts wrong array constructor
gscfq@t-online.de
gcc-bugzilla@gcc.gnu.org
Wed Dec 12 16:55:00 GMT 2018
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88467
--- Comment #1 from G. Steinmetz <gscfq@t-online.de> ---
Detected, as noted in pr88116 comment 5 :
$ cat z4.f90
program p
print *, [integer :: 1, [integer(4) :: 2, '3']]
end
$ gfortran-9-20181209 -c z4.f90
z4.f90:2:44:
2 | print *, [integer :: 1, [integer(4) :: 2, '3']]
| 1
Error: Can't convert CHARACTER(1) to INTEGER(4) at (1)
And also :
$ cat z8.f90
program p
print *, [integer(8) :: 1, [integer(8) :: 2, '3']]
end
$ gfortran-9-20181209 -c z8.f90
z8.f90:2:47:
2 | print *, [integer(8) :: 1, [integer(8) :: 2, '3']]
| 1
Error: Can't convert CHARACTER(1) to INTEGER(8) at (1)
More information about the Gcc-bugs
mailing list