diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-29 17:13:21 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-29 17:13:21 +0000 |
commit | 206442fb94e730012aa013a6f17528bce15c204a (patch) | |
tree | 8e1f689498920458a2310117e441af8e72b8054a | |
parent | d546072452527139d9b829c89eda87cbd783b8cb (diff) | |
download | gcc-206442fb94e730012aa013a6f17528bce15c204a.tar.gz |
PR java/13824
* tree.c (unsafe_for_reeval): Handle EXIT_BLOCK_EXPR nodes specially
as their EXIT_BLOCK_LABELED_BLOCK operands can lead to unbounded
recursion.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76872 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/tree.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b01814b5388..4493b214d5d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2004-01-29 Roger Sayle <roger@eyesopen.com> + + PR java/13824 + * tree.c (unsafe_for_reeval): Handle EXIT_BLOCK_EXPR nodes specially + as their EXIT_BLOCK_LABELED_BLOCK operands can lead to unbounded + recursion. + 2004-01-29 Kazu Hirata <kazu@cs.umass.edu> * config/frv/frv.c: Don't mention deprecated macros in diff --git a/gcc/tree.c b/gcc/tree.c index da94c4a5893..1be80e9dd20 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -1656,6 +1656,13 @@ unsafe_for_reeval (tree expr) unsafeness = 1; break; + case EXIT_BLOCK_EXPR: + /* EXIT_BLOCK_LABELED_BLOCK, a.k.a. TREE_OPERAND (expr, 0), holds + a reference to an ancestor LABELED_BLOCK, so we need to avoid + unbounded recursion in the 'e' traversal code below. */ + exp = EXIT_BLOCK_RETURN (expr); + return exp ? unsafe_for_reeval (exp) : 0; + default: tmp = (*lang_hooks.unsafe_for_reeval) (expr); if (tmp >= 0) |