https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103367

--- Comment #41 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-14 branch has been updated by Jerry DeLisle
<[email protected]>:

https://gcc.gnu.org/g:f471192e6e4da5c75d3a68192777ec12e1562c85

commit r14-12731-gf471192e6e4da5c75d3a68192777ec12e1562c85
Author: Christopher Albert <[email protected]>
Date:   Wed Apr 8 22:37:11 2026 +0200

    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]>
    (cherry picked from commit 326fe37d6981c189fb0f2a5a4ab7f7a5b95ecf89)

Reply via email to