diff options
author | Roger Sayle <roger@eyesopen.com> | 2004-01-29 17:13:21 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2004-01-29 17:13:21 +0000 |
commit | 06f12aa01b4b03024d907a0595ce7c10fb802af7 (patch) | |
tree | 8e1f689498920458a2310117e441af8e72b8054a /gcc/tree.c | |
parent | 4a5e0ed992ed75f1514c270f45282f28ddb7a4b9 (diff) | |
download | gcc-06f12aa01b4b03024d907a0595ce7c10fb802af7.zip gcc-06f12aa01b4b03024d907a0595ce7c10fb802af7.tar.gz gcc-06f12aa01b4b03024d907a0595ce7c10fb802af7.tar.bz2 |
re PR java/13824 (gcj SEGV with simple .java program)
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.
From-SVN: r76872
Diffstat (limited to 'gcc/tree.c')
-rw-r--r-- | gcc/tree.c | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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) |