Committed
On 4/9/26 9:30 AM, Jerry D wrote:
I plan to commit the attached patch shortly to close this out.
Regression tests OK
Thanks for comments all.
Regards
Jerry
---
fortran: Diagnose invalid array initializer after parameter
substitution [PR103367]
Keep the trunk fallback from r16-8509, but turn it into a real
constant-expression error instead of silently returning an empty
constructor. This avoids the ICE from PR103367 without regressing
the more specific diagnostics discussed in the Bugzilla follow-up.
PR fortran/103367
gcc/fortran/ChangeLog:
* trans-array.cc (gfc_conv_array_initializer): Emit an error for
invalid residual initializer expressions before returning a safe
empty constructor.
gcc/testsuite/ChangeLog:
* gfortran.dg/pr103367.f90: Expect a constant-expression error and
prune the legacy-extension warning.
Signed-off-by: Christopher Albert <[email protected]>