[Bug fortran/93289] array constructor of different length: Missing diagnostic when PARAMETER is in list
burnus at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Thu Jan 16 16:37:00 GMT 2020
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93289
--- Comment #2 from Tobias Burnus <burnus at gcc dot gnu.org> ---
(In reply to kargl from comment #1)
> It appears to be an undocumented extension. Add -Wall to your command line.
I would rather call it a bug :-)
The truncation warning is a separate thing. For instance, it (correctly)
triggers for the following valid code:
print *, [character(len=2) :: "ab", "hjf333"]
and it does not trigger for the invalid
character(len=*), parameter :: str = "123"
print *, [str, "ab"]
end
(Obviously also not for the valid "[character(len=20) :: "ab", str]".)
More information about the Gcc-bugs
mailing list