java/11045: int cast bug

Andrew Haley aph@redhat.com
Wed Nov 12 16:44:00 GMT 2003


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;
  



More information about the Java-patches mailing list