This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
java/11045: int cast bug
- From: Andrew Haley <aph at redhat dot com>
- To: java-patches at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Wed, 12 Nov 2003 16:43:29 GMT
- Subject: java/11045: int cast bug
2003-11-12 Andrew Haley <aph@redhat.com>
PR java/11045
* parse.y (fold_constant_for_init): Check that we really do have a
constant.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.454
diff -c -2 -p -w -r1.454 parse.y
*** parse.y 12 Nov 2003 15:24:42 -0000 1.454
--- parse.y 12 Nov 2003 16:41:23 -0000
*************** fold_constant_for_init (tree node, tree
*** 16090,16094 ****
return NULL_TREE;
TREE_OPERAND (node, 0) = val;
! return patch_unaryop (node, op0);
break;
--- 16090,16098 ----
return NULL_TREE;
TREE_OPERAND (node, 0) = val;
! val = patch_unaryop (node, op0);
! if (! TREE_CONSTANT (val))
! return NULL_TREE;
! return val;
!
break;