[Bug c++/95560] [8/9/11 Regression] ICE in comptypes, at cp/typeck.c:1498 since r7-4206-g84ff4775d41b716c

cvs-commit at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Jun 11 22:36:39 GMT 2020


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

--- Comment #8 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-9 branch has been updated by Marek Polacek
<mpolacek@gcc.gnu.org>:

https://gcc.gnu.org/g:02f6c5b711b8188c3f49a79c730911b0bd216585

commit r9-8668-g02f6c5b711b8188c3f49a79c730911b0bd216585
Author: Marek Polacek <polacek@redhat.com>
Date:   Thu Jun 11 17:58:21 2020 -0400

    c++: Fix ICE in check_local_shadow with enum [PR95560]

    Another indication that perhaps this warning is emitted too early.  We
    crash because same_type_p gets a null type: we have an enumerator
    without a fixed underlying type and finish_enum_value_list hasn't yet
    run.  So check if the type is null before calling same_type_p.

            PR c++/95560
            * name-lookup.c (check_local_shadow): Check if types are
            non-null before calling same_type_p.

            * g++.dg/warn/Wshadow-compatible-local-3.C: New test.


More information about the Gcc-bugs mailing list