From 0cc67c94cf105774d67b6b647c044073d3f497d9 Mon Sep 17 00:00:00 2001 From: Uros Bizjak Date: Tue, 9 Dec 2014 15:34:32 +0100 Subject: [PATCH] =?utf8?q?re=20PR=20bootstrap/64213=20(gimple-match.c:1523?= =?utf8?q?:6:=20error:=20=E2=80=98GIMPLE=E2=80=99=20was=20not=20declared?= =?utf8?q?=20in=20this=20scope)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit PR bootstrap/64213 Revert: 2014-11-28 H.J. Lu PR rtl-optimization/64037 * combine.c (setup_incoming_promotions): Pass the argument before any promotions happen to promote_function_mode. testsuite/ChangeLog: PR bootstrap/64213 Revert: 2014-11-28 H.J. Lu PR rtl-optimization/64037 * g++.dg/pr64037.C: New test. From-SVN: r218516 --- gcc/ChangeLog | 10 ++++++++++ gcc/combine.c | 4 ++-- gcc/testsuite/ChangeLog | 9 +++++++++ gcc/testsuite/g++.dg/pr64037.C | 27 --------------------------- 4 files changed, 21 insertions(+), 29 deletions(-) delete mode 100644 gcc/testsuite/g++.dg/pr64037.C diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 75312341824..c38a0721629 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2014-12-09 Uros Bizjak + + PR bootstrap/64213 + Revert: + 2014-11-28 H.J. Lu + + PR rtl-optimization/64037 + * combine.c (setup_incoming_promotions): Pass the argument + before any promotions happen to promote_function_mode. + 2014-12-09 Richard Biener PR tree-optimization/64193 diff --git a/gcc/combine.c b/gcc/combine.c index 39f92009136..9ed03be2219 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -1579,8 +1579,8 @@ setup_incoming_promotions (rtx_insn *first) uns3 = TYPE_UNSIGNED (DECL_ARG_TYPE (arg)); /* The mode and signedness of the argument as it is actually passed, - see assign_parm_setup_reg in function.c. */ - mode3 = promote_function_mode (TREE_TYPE (arg), mode1, &uns1, + after any TARGET_PROMOTE_FUNCTION_ARGS-driven ABI promotions. */ + mode3 = promote_function_mode (DECL_ARG_TYPE (arg), mode2, &uns3, TREE_TYPE (cfun->decl), 0); /* The mode of the register in which the argument is being passed. */ diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ed0315622f2..cc4a7347a63 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,12 @@ +2014-12-09 Uros Bizjak + + PR bootstrap/64213 + Revert: + 2014-11-28 H.J. Lu + + PR rtl-optimization/64037 + * g++.dg/pr64037.C: New test. + 2014-12-09 Richard Biener PR tree-optimization/64193 diff --git a/gcc/testsuite/g++.dg/pr64037.C b/gcc/testsuite/g++.dg/pr64037.C deleted file mode 100644 index e5cd0e2ee17..00000000000 --- a/gcc/testsuite/g++.dg/pr64037.C +++ /dev/null @@ -1,27 +0,0 @@ -// { dg-do run { target i?86-*-* x86_64-*-* } } -// { dg-options "-std=c++11 -Os" } - -enum class X : unsigned char { - V = 2, -}; - -static void -__attribute__((noinline,noclone)) -foo(unsigned &out, unsigned a, X b) -{ - out = static_cast(b); -} - -int main() -{ - unsigned deadbeef = 0xDEADBEEF; - asm volatile ("" : "+d" (deadbeef), "+c" (deadbeef)); - - unsigned out; - foo(out, 2, X::V); - - if (out != 2) - __builtin_abort (); - - return 0; -} -- 2.30.2