aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1997-08-20 12:30:36 -0700
committerJim Wilson <wilson@gcc.gnu.org>1997-08-20 12:30:36 -0700
commite3eef942f2af7396eac71b5904e309086a5d9325 (patch)
tree9a998724eee2d94afabf425532271bbff0332889 /gcc
parent246853b927ebe22eac4f8079e2385df232fc0e02 (diff)
downloadgcc-e3eef942f2af7396eac71b5904e309086a5d9325.zip
gcc-e3eef942f2af7396eac71b5904e309086a5d9325.tar.gz
gcc-e3eef942f2af7396eac71b5904e309086a5d9325.tar.bz2
stmt.c (start_cleanup_deferal, [...]): Test block_stack before dereferencing it.
* stmt.c (start_cleanup_deferal, end_cleanup_deferal): Test block_stack before dereferencing it. From-SVN: r14861
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/stmt.c10
2 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7f46b20..d34368c 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,9 @@
-Wed Aug 20 14:57:11 1997 Michael Meissner <meissner@cygnus.com>
+Wed Aug 20 11:58:33 1997 Jim Wilson <wilson@cygnus.com>
+
+ * stmt.c (start_cleanup_deferal, end_cleanup_deferal): Test
+ block_stack before dereferencing it.
+
+Wed Aug 20 11:57:11 1997 Michael Meissner <meissner@cygnus.com>
* rs6000.h (ISSUE_RATE): Define instead of MACHINE_issue_rate.
diff --git a/gcc/stmt.c b/gcc/stmt.c
index dcc5fa3..bc1e6ba 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -4212,7 +4212,10 @@ expand_cleanups (list, dont_do, in_fixup, reachable)
void
start_cleanup_deferal ()
{
- ++block_stack->data.block.conditional_code;
+ /* block_stack can be NULL if we are inside the parameter list. It is
+ OK to do nothing, because cleanups aren't possible here. */
+ if (block_stack)
+ ++block_stack->data.block.conditional_code;
}
/* Mark the end of a conditional region of code. Because cleanup
@@ -4223,7 +4226,10 @@ start_cleanup_deferal ()
void
end_cleanup_deferal ()
{
- --block_stack->data.block.conditional_code;
+ /* block_stack can be NULL if we are inside the parameter list. It is
+ OK to do nothing, because cleanups aren't possible here. */
+ if (block_stack)
+ --block_stack->data.block.conditional_code;
}
/* Move all cleanups from the current block_stack