From: kkojima Date: Tue, 26 Apr 2011 22:25:59 +0000 (+0000) Subject: * config/sh/sh.c (sh_gimplify_va_arg_expr): Don't call X-Git-Tag: upstream/4.9.2~21158 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=90d67aec2b9eb4c077890bab272c13c226094f44;p=platform%2Fupstream%2Flinaro-gcc.git * config/sh/sh.c (sh_gimplify_va_arg_expr): Don't call targetm.calls.must_pass_in_stack for void type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172991 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 1b1f4d2..6714b1f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2011-04-26 Kaz Kojima + + PR target/48767 + * config/sh/sh.c (sh_gimplify_va_arg_expr): Don't call + targetm.calls.must_pass_in_stack for void type. + 2011-04-26 Jan Hubicka * cgraphbuild.c (build_cgraph_edges): Update call 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);