diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-09-02 08:54:04 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2006-09-02 08:54:04 +0200 |
commit | 07515729e96d9c36052b6894c3c49afa8a2582b7 (patch) | |
tree | 9b7c48e9461ca34a3b64ee0d02f58debc7ffdf47 /gcc/cp/except.c | |
parent | b2a06efa610db53a7d1840649128f70c8bc10ae8 (diff) | |
download | gcc-07515729e96d9c36052b6894c3c49afa8a2582b7.zip gcc-07515729e96d9c36052b6894c3c49afa8a2582b7.tar.gz gcc-07515729e96d9c36052b6894c3c49afa8a2582b7.tar.bz2 |
re PR c++/28878 (ICE using "[" instead of "{")
PR c++/28878
* except.c (build_throw): Only set current_function_returns_abnormally
if cfun is not NULL.
* g++.dg/parse/crash33.C: New test.
From-SVN: r116655
Diffstat (limited to 'gcc/cp/except.c')
-rw-r--r-- | gcc/cp/except.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/except.c b/gcc/cp/except.c index ad493aa..f97ab06 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -605,7 +605,8 @@ build_throw (tree exp) if (processing_template_decl) { - current_function_returns_abnormally = 1; + if (cfun) + current_function_returns_abnormally = 1; return build_min (THROW_EXPR, void_type_node, exp); } |