aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2004-03-15 17:56:14 +0000
committerAndrew Haley <aph@gcc.gnu.org>2004-03-15 17:56:14 +0000
commitbfb7b1722446dc437472239e8924c61ddf3f2cd1 (patch)
tree1dda63adcedcb328720c214e3fa717ceac87372d /gcc
parent625cbf9318915e406776ab23a21fbb7093889c7a (diff)
downloadgcc-bfb7b1722446dc437472239e8924c61ddf3f2cd1.zip
gcc-bfb7b1722446dc437472239e8924c61ddf3f2cd1.tar.gz
gcc-bfb7b1722446dc437472239e8924c61ddf3f2cd1.tar.bz2
re PR java/14581 (gcj internal error: Segmentation fault involving switch to a final var)
2004-03-15 Andrew Haley <aph@redhat.com> PR java/14581 * parse.y (java_complete_lhs): Check that final variable has an initializer. From-SVN: r79505
Diffstat (limited to 'gcc')
-rw-r--r--gcc/java/ChangeLog6
-rw-r--r--gcc/java/parse.y3
2 files changed, 8 insertions, 1 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog
index f080725..2657d62 100644
--- a/gcc/java/ChangeLog
+++ b/gcc/java/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-15 Andrew Haley <aph@redhat.com>
+
+ PR java/14581
+ * parse.y (java_complete_lhs): Check that final variable has an
+ initializer.
+
2004-03-12 Andrew Haley <aph@redhat.com>
PR java/14551
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 14bec8d..049e50b 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -11653,7 +11653,8 @@ java_complete_lhs (tree node)
TREE_OPERAND (cn, 1));
}
/* Accept final locals too. */
- else if (TREE_CODE (cn) == VAR_DECL && DECL_FINAL (cn))
+ else if (TREE_CODE (cn) == VAR_DECL && DECL_FINAL (cn)
+ && DECL_INITIAL (cn))
cn = fold_constant_for_init (DECL_INITIAL (cn), cn);
if (!TREE_CONSTANT (cn) && !flag_emit_xref)