[PATCH] Fortran: different character lengths in array constructor [PR93289]
Harald Anlauf
anlauf@gmx.de
Sat Feb 1 21:55:27 GMT 2025
Am 01.02.25 um 21:49 schrieb Harald Anlauf:
> So why must we be so tough?
Here's what I get from other compilers:
Intel, Nvidia, AMD flang: silent by default.
ifx -stand f18:
char_array_constructor_5.f90(11): warning #8208: If type specification
is omitted, each ac-value expression in the array constructor of type
CHARACTER must have the same length type parameters. ['ab']
print *, [str, "ab", "hjf333"] ! { dg-warning "must have the same length" }
---------------^
So no error, but Intel is known to often be on the loose side.
NAG: hard error.
That's what we get with -std=f*, too.
More information about the Fortran
mailing list