From 70f1c3b70ff771a0e4f615e8e5607bf9400b78e5 Mon Sep 17 00:00:00 2001 From: nemet Date: Wed, 19 Nov 2008 23:13:29 +0000 Subject: [PATCH] * config/mips/mips.c (mips_gimplify_va_arg_expr): Use -rsize with the same type as the first operand of the AND expression. testsuite/ * gcc.c-torture/compile/20081119-1.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@142024 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/mips/mips.c | 2 +- gcc/testsuite/ChangeLog | 4 ++++ gcc/testsuite/gcc.c-torture/compile/20081119-1.c | 5 +++++ 4 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 gcc/testsuite/gcc.c-torture/compile/20081119-1.c diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b21a632bcf5..a16ad1cc7b3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2008-11-19 Adam Nemet + + * config/mips/mips.c (mips_gimplify_va_arg_expr): Use -rsize + with the same type as the first operand of the AND expression. + 2008-11-19 Vladimir Makarov PR bootstrap/37859 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 0c2836dbd65..c868b10a107 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -5332,7 +5332,7 @@ mips_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, { /* [1] Emit code for: off &= -rsize. */ t = build2 (BIT_AND_EXPR, TREE_TYPE (off), off, - build_int_cst (NULL_TREE, -rsize)); + build_int_cst (TREE_TYPE (off), -rsize)); gimplify_assign (off, t, pre_p); } osize = rsize; diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 85f9f279faf..9c4ca41bb15 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2008-11-19 Adam Nemet + + * gcc.c-torture/compile/20081119-1.c: New test. + 2008-11-19 Dodji Seketeli PR c++/35405 diff --git a/gcc/testsuite/gcc.c-torture/compile/20081119-1.c b/gcc/testsuite/gcc.c-torture/compile/20081119-1.c new file mode 100644 index 00000000000..7402f549be5 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/20081119-1.c @@ -0,0 +1,5 @@ +unsigned long long +f (__builtin_va_list ap) +{ + return __builtin_va_arg (ap, unsigned long long); +} -- 2.11.4.GIT