]> git.ipfire.org Git - thirdparty/gcc.git/commit
c++: ICE with computed gotos [PR115469]
authorMarek Polacek <polacek@redhat.com>
Wed, 26 Jun 2024 21:55:21 +0000 (17:55 -0400)
committerMarek Polacek <polacek@redhat.com>
Mon, 1 Jul 2024 22:16:48 +0000 (18:16 -0400)
commitc90e785bb6fde02cc009f296332a1469fcc1261a
tree2418b849790a5688cf897dc73578f03f256f0ac1
parentcb39f7df8d1c16cc2763952a9cc0c828ba88b4d7
c++: ICE with computed gotos [PR115469]

This is a low-prio crash on invalid code where we ICE on a VAR_DECL
with erroneous type.  I thought I'd try to avoid putting such decls
into ->names and ->names_in_scope but that sounds riskier than the
following cleanup.

PR c++/115469

gcc/cp/ChangeLog:

* decl.cc (automatic_var_with_nontrivial_dtor_p): New.
(poplevel_named_label_1): Use it.
(check_goto_1): Likewise.

gcc/testsuite/ChangeLog:

* g++.dg/ext/label17.C: New test.
gcc/cp/decl.cc
gcc/testsuite/g++.dg/ext/label17.C [new file with mode: 0644]