This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR java/21115: false boolean argument passed from pre-compiled to interpreted method is true


Promotion of outgoing args is broken.  This is for trunk and branch.

Andrew.


2005-04-21  Andrew Haley  <aph@redhat.com>

	* expr.c (force_evaluation_order): Convert outgoing args smaller
	than integer.

Index: expr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/expr.c,v
retrieving revision 1.221
diff -p -2 -c -r1.221 expr.c
*** expr.c	17 Mar 2005 14:43:26 -0000	1.221
--- expr.c	21 Apr 2005 13:25:57 -0000
*************** maybe_adjust_start_pc (struct JCF *jcf, 
*** 3485,3489 ****
     left-to-right order evaluation is performed. Saved expressions
     will, in CALL_EXPR order, be reused when the call will be expanded.
! */
  
  tree
--- 3485,3490 ----
     left-to-right order evaluation is performed. Saved expressions
     will, in CALL_EXPR order, be reused when the call will be expanded.
! 
!    We also promote outgoing args if needed.  */
  
  tree
*************** force_evaluation_order (tree node)
*** 3519,3522 ****
--- 3520,3532 ----
        for (cmp = NULL_TREE; arg; arg = TREE_CHAIN (arg))
  	{
+ 	  /* Promote types smaller than integer.  This is required by
+ 	     some ABIs.  */
+ 	  tree type = TREE_TYPE (TREE_VALUE (arg));
+ 	  if (targetm.calls.promote_prototypes (type)
+ 	      && INTEGRAL_TYPE_P (type)
+ 	      && INT_CST_LT_UNSIGNED (TYPE_SIZE (type),
+ 				      TYPE_SIZE (integer_type_node)))
+ 	    TREE_VALUE (arg) = fold_convert (integer_type_node, TREE_VALUE (arg));
+ 
  	  tree saved = save_expr (force_evaluation_order (TREE_VALUE (arg)));
  	  cmp = (cmp == NULL_TREE ? saved :


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]