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

--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sandra Loosemore <san...@gcc.gnu.org>:

https://gcc.gnu.org/g:85a3442c85aedb00c59e986f16cccbb8ec60d777

commit r12-6268-g85a3442c85aedb00c59e986f16cccbb8ec60d777
Author: Sandra Loosemore <san...@codesourcery.com>
Date:   Tue Jan 4 18:18:13 2022 -0800

    Fortran: Fix ICE caused by missing error for untyped symbol [PR103258]

    The bit on a symbol to mark that it had already been diagnosed as
    lacking a type was getting set even when the error was suppressed or
    discarded, specifically when doing early resolution on a character
    length expression to see if it can be constant-folded.  Explicitly
    suppress errors before doing that, then check whether they are
    suppressed before setting the bit.

    2022-01-04  Sandra Loosemore  <san...@codesourcery.com>

            PR fortran/103258

            gcc/fortran/
            * decl.c (gfc_match_char_spec): Suppress errors around call
            to gfc_reduce_init_expr.
            * error.c (gfc_query_suppress_errors): New.
            * gfortran.h (gfc_query_suppress_errors): Declare.
            * symbol.c (gfc_set_default_type): Check gfc_query_suppress_errors.

            gcc/testsuite/
            * gfortran.dg/pr103258.f90: New.

Reply via email to