From a7485e9375687b897612280a3a33d45542783f6c Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Thu, 8 Apr 2004 15:38:00 +0200 Subject: [PATCH] decl2.c (mark_used): Don't segfault if cfun != NULL but current_function_decl == NULL. * decl2.c (mark_used): Don't segfault if cfun != NULL but current_function_decl == NULL. From-SVN: r80506 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/decl2.c | 1 + 2 files changed, 6 insertions(+) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d183371978e..d1873a8a20a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2004-04-08 Jakub Jelinek + + * decl2.c (mark_used): Don't segfault if cfun != NULL but + current_function_decl == NULL. + 2004-04-05 Nathan Sidwell PR c++/3518 diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 0a4e8e9d0d2..de09eb69261 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -3030,6 +3030,7 @@ mark_used (tree decl) generate its body to find that out. */ || TREE_NOTHROW (decl) || !cfun + || !current_function_decl /* If we already know the current function can't throw, then we don't need to work hard to prove it. */ || TREE_NOTHROW (current_function_decl) -- 2.30.2