aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-08 13:37:10 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-08 13:37:10 +0000
commit8166030c99aa759b873fabcdcf761f5bfb30a3cf (patch)
tree4496a45c712a239a93a5fda8d481b603758a55bd /gcc
parent5dcd2786dbc3fa63f49fae0a3a6a5c42b91d82c4 (diff)
* decl2.c (mark_used): Don't segfault if cfun != NULL but
current_function_decl == NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-3_4-branch@80505 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog5
-rw-r--r--gcc/cp/decl2.c1
2 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index c152410c213..c8ea8f86440 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2004-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ * decl2.c (mark_used): Don't segfault if cfun != NULL but
+ current_function_decl == NULL.
+
2004-04-01 Mark Mitchell <mark@codesourcery.com>
PR c++/14803
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 689356e54d1..510667a4f56 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -3019,6 +3019,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)