integrate.c (expand_inline_function): Use the mode of FNDECL's result rtl...
authorBrendan Kehoe <brendan@gcc.gnu.org>
Mon, 9 Jun 1997 23:01:12 +0000 (19:01 -0400)
committerBrendan Kehoe <brendan@gcc.gnu.org>
Mon, 9 Jun 1997 23:01:12 +0000 (19:01 -0400)
* integrate.c (expand_inline_function): Use the mode of FNDECL's
result rtl, not the result type itself, in setting ARRIVING_MODE.

From-SVN: r14198

gcc/integrate.c

index d5f5b51d0446e26ee04d18f199d42085c6fbe3d5..92052bfa2de4657172c1a0cc3076d669e2d683dd 100644 (file)
@@ -1673,9 +1673,11 @@ expand_inline_function (fndecl, parms, target, ignore, type,
       /* Machine mode function was declared to return.   */
       enum machine_mode departing_mode = TYPE_MODE (type);
       /* (Possibly wider) machine mode it actually computes
-        (for the sake of callers that fail to declare it right).  */
+        (for the sake of callers that fail to declare it right).
+        We have to use the mode of the result's RTL, rather than
+        its type, since expand_function_start may have promoted it.  */
       enum machine_mode arriving_mode
-       = TYPE_MODE (TREE_TYPE (DECL_RESULT (fndecl)));
+       = GET_MODE (DECL_RTL (DECL_RESULT (fndecl)));
       rtx reg_to_map;
 
       /* Don't use MEMs as direct targets because on some machines