parse.y (build_new_array_init): Don't set EXPR_WFL_LINECOL on CONSTRUCTOR (since...
authorPer Bothner <bothner@gcc.gnu.org>
Sat, 9 Jan 1999 12:49:05 +0000 (04:49 -0800)
committerPer Bothner <bothner@gcc.gnu.org>
Sat, 9 Jan 1999 12:49:05 +0000 (04:49 -0800)

* parse.y (build_new_array_init):  Don't set EXPR_WFL_LINECOL
on CONSTRUCTOR (since that trashes TREE_CST_RTL).
(patch_new_array_init):  Clear TREE_CONSTANT also if INDIRECT_REF.
(register_fields):  Set TREE_STATIC on NEW_ARRAY_INIT, not on
CONSTRUCTOR (which causes expand_expr to call output_constant_def).
* expr.c (java_lang_expand_expr):  Check TREE_STATIC of NEW_ARRAY_INIT.

From-SVN: r24579

gcc/java/expr.c

index 4c5d1bb27f04ff3ae9133bcc37879b0a8bce4609..136415ba3788b4b7bb195a03c21eaa3624695556 100644 (file)
@@ -1768,7 +1768,7 @@ java_lang_expand_expr (exp, target, tmode, modifier)
        tree array_decl;
 #if 0
        /* Enable this once we can set the vtable field statically.  FIXME */
-       if (TREE_CONSTANT (init) && TREE_STATIC (init)
+       if (TREE_CONSTANT (init) && TREE_STATIC (exp)
            && JPRIMITIVE_TYPE_P (element_type))
          {
            tree temp, value, init_decl;