Commit 36aa0bf5 by Richard Kenner

(expand_inline_function): Don't call convert_to_mode unless we need to...

(expand_inline_function): Don't call convert_to_mode unless we need
to; some converstions of VOIDmode objects can mess them up.

From-SVN: r4359
parent 619fdc9c
/* Procedure integration for GNU CC. /* Procedure integration for GNU CC.
Copyright (C) 1988, 1991 Free Software Foundation, Inc. Copyright (C) 1988, 1991, 1993 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com) Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GNU CC. This file is part of GNU CC.
...@@ -1242,12 +1242,17 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add ...@@ -1242,12 +1242,17 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
arg_vals[i] = XEXP (stack_slot, 0); arg_vals[i] = XEXP (stack_slot, 0);
} }
else if (GET_CODE (loc) != MEM) else if (GET_CODE (loc) != MEM)
/* The mode if LOC and ARG can differ if LOC was a variable {
that had its mode promoted via PROMOTED_MODE. */ if (GET_MODE (loc) != TYPE_MODE (TREE_TYPE (arg)))
arg_vals[i] = convert_to_mode (GET_MODE (loc), /* The mode if LOC and ARG can differ if LOC was a variable
expand_expr (arg, NULL_RTX, mode, that had its mode promoted via PROMOTED_MODE. */
EXPAND_SUM), arg_vals[i] = convert_to_mode (GET_MODE (loc),
TREE_UNSIGNED (TREE_TYPE (formal))); expand_expr (arg, NULL_RTX, mode,
EXPAND_SUM),
TREE_UNSIGNED (TREE_TYPE (formal)));
else
arg_vals[i] = expand_expr (arg, NULL_RTX, mode, EXPAND_SUM);
}
else else
arg_vals[i] = 0; arg_vals[i] = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment