re PR c++/67409 (tree-cfg.c dereferences a NULL pointer)
authorJakub Jelinek <jakub@redhat.com>
Thu, 19 Nov 2015 16:18:39 +0000 (17:18 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 19 Nov 2015 16:18:39 +0000 (17:18 +0100)
commit2c4437019f044d7d659e0cb36ff0afb461950977
tree992607ebfe44ec436c19d44c6cfe72f68fc36911
parent1e1ce42e7224ff9ebf8ad82178894f4f0ccfb9eb
re PR c++/67409 (tree-cfg.c dereferences a NULL pointer)

PR c++/67409
* decl.c (identify_goto): Add LOC and DIAG_KIND arguments, call
emit_diagnostic instead of permerror.
(check_previous_goto_1): Adjust identify_goto callers, treat all
cases but crossing initialization and entering scope of decl with
non-trivial dtor as unconditional hard errors.
(check_goto): Use identify_goto.  Treat all cases but crossing
initialization and entering scope of decl with non-trivial dtor
as unconditional hard errors.

* g++.dg/eh/goto3.C: New test.

Co-Authored-By: Manuel López-Ibáñez <manu@gcc.gnu.org>
From-SVN: r230613
gcc/ChangeLog
gcc/cp/decl.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/eh/goto3.C [new file with mode: 0644]