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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Andrew Pinski <pins...@gcc.gnu.org>:

https://gcc.gnu.org/g:879c91fcccf93681bd7e13290bfbb384cadcd268

commit r14-4728-g879c91fcccf93681bd7e13290bfbb384cadcd268
Author: Andrew Pinski <pins...@gmail.com>
Date:   Sat Oct 14 13:40:05 2023 -0700

    [c] Fix PR 101364: ICE after error due to diagnose_arglist_conflict not
checking for error

    When checking to see if we have a function declaration has a conflict due
to
    promotations, there is no test to see if the type was an error mark and
then calls
    c_type_promotes_to. c_type_promotes_to is not ready for error_mark and
causes an
    ICE.

    This adds a check for error before the call of c_type_promotes_to.

    OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.

            PR c/101364

    gcc/c/ChangeLog:

            * c-decl.cc (diagnose_arglist_conflict): Test for
            error mark before calling of c_type_promotes_to.

    gcc/testsuite/ChangeLog:

            * gcc.dg/pr101364-1.c: New test.

Reply via email to