A quick read to C1010 (§10.1.11 in Fortran 2018 draft) suggests that this should be rejected due to 10.1.11p2 (2), so flang seems correct. However, all other compilers I've been able to test accept this.
If we keep reading, there is 10.1.11p2 (7)
"Specification inquiry" is defined at 10.1.11p4 and 10.1.11p4 (1) should cover the invocation to LEN.
(Sorry again for the wordy title)
flang
is rejecting the following codeA quick read to C1010 (§10.1.11 in Fortran 2018 draft) suggests that this should be rejected due to
10.1.11p2 (2)
, soflang
seems correct. However, all other compilers I've been able to test accept this.If we keep reading, there is
10.1.11p2 (7)
"Specification inquiry" is defined at
10.1.11p4
and10.1.11p4 (1)
should cover the invocation toLEN
.