diff options
author | Marek Polacek <polacek@redhat.com> | 2020-06-16 13:02:23 -0400 |
---|---|---|
committer | Marek Polacek <polacek@redhat.com> | 2020-06-16 13:08:57 -0400 |
commit | 2661635323bd44410f1a154683eccecd2c163b46 (patch) | |
tree | 615689aa0a6b034cbb0fbfc0cd3973d2e3961ff6 /gcc/fortran/openmp.c | |
parent | 43a9b25c17d264b81832e3bc09135f736c9e42ec (diff) | |
download | gcc-2661635323bd44410f1a154683eccecd2c163b46.zip gcc-2661635323bd44410f1a154683eccecd2c163b46.tar.gz gcc-2661635323bd44410f1a154683eccecd2c163b46.tar.bz2 |
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-local-3.C: New test.
Diffstat (limited to 'gcc/fortran/openmp.c')
0 files changed, 0 insertions, 0 deletions