]> gcc.gnu.org Git - gcc.git/commitdiff
expr.c (do_store_flag): Pass operand_mode instead of GET_MODE (op0) to expand_shift.
authorJakub Jelinek <jakub@redhat.com>
Tue, 31 Oct 2000 16:02:45 +0000 (17:02 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 31 Oct 2000 16:02:45 +0000 (17:02 +0100)
* 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

gcc/ChangeLog
gcc/expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.old-deja/g++.other/inline16.C [new file with mode: 0644]

index f4a90da6f84f4720360cf38ba52d1b73d4c31250..6d3e05273e7dcca00e3d03b7fe1ae206e063bad4 100644 (file)
@@ -1,3 +1,8 @@
+2000-10-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * 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 <amylaar@redhat.com>
 
        * sh-protos.h (reg_no_subreg_operand, emit_fpscr_use): Don't declare.
index d12f0a2cafc1ca07c235f01fc3d1681349a30ee6..22ed6ad31353e6817bddb3e4dc73a7d648e42587 100644 (file)
@@ -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)
index bb486a497bc193ae558b5cf0764116f8fa6439c3..33002ac02374e1bc399a6ee5fb39799d498dc4dd 100644 (file)
@@ -1,3 +1,7 @@
+2000-10-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * g++.old-deja/g++.other/inline16.C: New test.
+
 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
 
        * 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 (file)
index 0000000..3404f43
--- /dev/null
@@ -0,0 +1,24 @@
+// Build don't link:
+// Origin: Jakub Jelinek <jakub@redhat.com>
+// 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);
+}
This page took 0.09992 seconds and 5 git commands to generate.