From: Jakub Jelinek Date: Tue, 31 Oct 2000 16:02:45 +0000 (+0100) Subject: expr.c (do_store_flag): Pass operand_mode instead of GET_MODE (op0) to expand_shift. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=681cb2337b00d65d62f78e653d6808b74ded295d;p=gcc.git expr.c (do_store_flag): Pass operand_mode instead of GET_MODE (op0) to expand_shift. * expr.c (do_store_flag): Pass operand_mode instead of GET_MODE (op0) to expand_shift. * g++.old-deja/g++.other/inline16.C: New test. From-SVN: r37160 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f4a90da6f84..6d3e05273e7 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-10-31 Jakub Jelinek + + * expr.c (do_store_flag): Pass operand_mode instead of GET_MODE (op0) + to expand_shift. + Tue Oct 31 15:33:27 2000 J"orn Rennecke * sh-protos.h (reg_no_subreg_operand, emit_fpscr_use): Don't declare. diff --git a/gcc/expr.c b/gcc/expr.c index d12f0a2cafc..22ed6ad3135 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -10285,7 +10285,7 @@ do_store_flag (exp, target, mode, only_cheap) op0 = expand_expr (inner, subtarget, VOIDmode, 0); if (bitnum != 0) - op0 = expand_shift (RSHIFT_EXPR, GET_MODE (op0), op0, + op0 = expand_shift (RSHIFT_EXPR, operand_mode, op0, size_int (bitnum), subtarget, ops_unsignedp); if (GET_MODE (op0) != mode) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index bb486a497bc..33002ac0237 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-10-31 Jakub Jelinek + + * g++.old-deja/g++.other/inline16.C: New test. + 2000-10-31 Gabriel Dos Reis * g++.old-deja/g++.pt/memtemp77.C (main): Adjust comparison against. diff --git a/gcc/testsuite/g++.old-deja/g++.other/inline16.C b/gcc/testsuite/g++.old-deja/g++.other/inline16.C new file mode 100644 index 00000000000..3404f43977c --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/inline16.C @@ -0,0 +1,24 @@ +// Build don't link: +// Origin: Jakub Jelinek +// Special g++ Options: -O1 + +struct foo { + bool x; + inline void a (unsigned char y); + inline void b (void); + virtual ~foo (); +}; + +foo::~foo () +{ +} + +void foo::a (unsigned char y) +{ + x = ((y & 2) != 0); +} + +void foo::b (void) +{ + a(0x07); +}