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
This commit is contained in:
Andrew Haley 2004-03-15 17:56:14 +00:00 committed by Andrew Haley
parent 625cbf9318
commit bfb7b17224
2 changed files with 8 additions and 1 deletions

View File

@ -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

View File

@ -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)