aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/sh
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@gcc.gnu.org>2011-04-26 22:25:59 +0000
committerKaz Kojima <kkojima@gcc.gnu.org>2011-04-26 22:25:59 +0000
commit57a944d78451ea23bb2ca956d6ec2ec50fbd0851 (patch)
treed1c5a81e567ed40e0178bc918e51aa02356c342c /gcc/config/sh
parent3a1fd30c8a3a4474ff04b9d857deff3792fa2087 (diff)
downloadgcc-57a944d78451ea23bb2ca956d6ec2ec50fbd0851.zip
gcc-57a944d78451ea23bb2ca956d6ec2ec50fbd0851.tar.gz
gcc-57a944d78451ea23bb2ca956d6ec2ec50fbd0851.tar.bz2
sh.c (sh_gimplify_va_arg_expr): Don't call targetm.calls.must_pass_in_stack for void type.
* config/sh/sh.c (sh_gimplify_va_arg_expr): Don't call targetm.calls.must_pass_in_stack for void type. From-SVN: r172991
Diffstat (limited to 'gcc/config/sh')
-rw-r--r--gcc/config/sh/sh.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index c84c510..6d0e213 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -8062,9 +8062,14 @@ sh_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
HOST_WIDE_INT size, rsize;
tree tmp, pptr_type_node;
tree addr, lab_over = NULL, result = NULL;
- int pass_by_ref = targetm.calls.must_pass_in_stack (TYPE_MODE (type), type);
+ bool pass_by_ref;
tree eff_type;
+ if (!VOID_TYPE_P (type))
+ pass_by_ref = targetm.calls.must_pass_in_stack (TYPE_MODE (type), type);
+ else
+ pass_by_ref = false;
+
if (pass_by_ref)
type = build_pointer_type (type);