]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
sh.c (sh_gimplify_va_arg_expr): Use VIEW_CONVERT_EXPR if needed.
authorKaz Kojima <kkojima@gcc.gnu.org>
Sat, 27 Sep 2008 22:12:08 +0000 (22:12 +0000)
committerKaz Kojima <kkojima@gcc.gnu.org>
Sat, 27 Sep 2008 22:12:08 +0000 (22:12 +0000)
* config/sh/sh.c (sh_gimplify_va_arg_expr): Use VIEW_CONVERT_EXPR
if needed.

From-SVN: r140724

gcc/ChangeLog
gcc/config/sh/sh.c

index 9b32387518dea2a237001fde897d696a50054997..8782ad27374573e457953f845a7f7132ee6b0cdf 100644 (file)
@@ -1,3 +1,8 @@
+2008-09-27  Kaz Kojima  <kkojima@gcc.gnu.org>
+
+       * config/sh/sh.c (sh_gimplify_va_arg_expr): Use VIEW_CONVERT_EXPR
+       if needed.
+
 2008-09-26  Vladimir Makarov  <vmakarov@redhat.com>
 
        Revert:
index fdd98937f8c494fc6e9522d8431c7a0ebfc5c627..533d28c53a84a65df141bc5f8c9099750172e0dc 100644 (file)
@@ -7385,7 +7385,9 @@ sh_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
                = std_gimplify_va_arg_expr (next_fp_tmp, subtype, pre_p, NULL);
              real = get_initialized_tmp_var (real, pre_p, NULL);
 
-             result = build2 (COMPLEX_EXPR, type, real, imag);
+             result = build2 (COMPLEX_EXPR, eff_type, real, imag);
+             if (type != eff_type)
+               result = build1 (VIEW_CONVERT_EXPR, type, result);
              result = get_initialized_tmp_var (result, pre_p, NULL);
            }
 #endif /* FUNCTION_ARG_SCmode_WART */