Commit bfb7b172 by Andrew Haley Committed by Andrew Haley

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
parent 625cbf93
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
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment