aboutsummaryrefslogtreecommitdiff
path: root/gcc/integrate.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1993-05-06 12:54:41 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1993-05-06 12:54:41 -0400
commit36aa0bf595347b210b80a80be4fc561673fa5deb (patch)
treeb1c811c53af37163a9a5e819529d239afa4b9ac1 /gcc/integrate.c
parent619fdc9c7a57494aed214046d1a06e59a614ce4a (diff)
downloadgcc-36aa0bf595347b210b80a80be4fc561673fa5deb.zip
gcc-36aa0bf595347b210b80a80be4fc561673fa5deb.tar.gz
gcc-36aa0bf595347b210b80a80be4fc561673fa5deb.tar.bz2
(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
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r--gcc/integrate.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index ebc219f..6a7fef5 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -1,5 +1,5 @@
/* 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)
This file is part of GNU CC.
@@ -1242,12 +1242,17 @@ expand_inline_function (fndecl, parms, target, ignore, type, structure_value_add
arg_vals[i] = XEXP (stack_slot, 0);
}
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. */
- arg_vals[i] = convert_to_mode (GET_MODE (loc),
- expand_expr (arg, NULL_RTX, mode,
- EXPAND_SUM),
- TREE_UNSIGNED (TREE_TYPE (formal)));
+ {
+ if (GET_MODE (loc) != TYPE_MODE (TREE_TYPE (arg)))
+ /* The mode if LOC and ARG can differ if LOC was a variable
+ that had its mode promoted via PROMOTED_MODE. */
+ arg_vals[i] = convert_to_mode (GET_MODE (loc),
+ 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
arg_vals[i] = 0;