File nvl775482.patch of Package gcc43

Index: gcc/calls.c
===================================================================
--- gcc/calls.c	(revision 183243)
+++ gcc/calls.c	(working copy)
@@ -3497,6 +3497,9 @@ emit_library_call_value_1 (int retval, r
     {
       rtx val = va_arg (p, rtx);
       enum machine_mode mode = va_arg (p, enum machine_mode);
+#if defined(PROMOTE_FUNCTION_MODE)
+      int unsigned_p = 0;
+#endif
 
       /* We cannot convert the arg value to the mode the library wants here;
 	 must do it earlier where we know the signedness of the arg.  */
@@ -3554,6 +3557,10 @@ emit_library_call_value_1 (int retval, r
 	  val = force_operand (XEXP (slot, 0), NULL_RTX);
 	}
 
+#if defined(PROMOTE_FUNCTION_MODE)
+      PROMOTE_FUNCTION_MODE (mode, &unsigned_p, NULL_TREE);
+      val = convert_modes (mode, GET_MODE (val), val, unsigned_p);
+#endif
       argvec[count].value = val;
       argvec[count].mode = mode;
 
openSUSE Build Service is sponsored by