re PR target/11475 (reload ICE with bitfields)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Fri, 30 Jan 2004 07:00:45 +0000 (08:00 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 30 Jan 2004 07:00:45 +0000 (07:00 +0000)
PR target/11475
* config/sparc/sparc.md (movhi_lo_sum): Tighten predicates.

From-SVN: r76928

gcc/ChangeLog
gcc/config/sparc/sparc.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/compile/20040130-1.c [new file with mode: 0644]

index 8ef7b9f..87f4728 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-30  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR target/11475
+       * config/sparc/sparc.md (movhi_lo_sum): Tighten predicates.
+
 2004-01-29  Jakub Jelinek  <jakub@redhat.com>
 
        * emit-rtl.c (change_address): Use XEXP (memref, 0) instead
index 0843478..850b2f5 100644 (file)
@@ -1,8 +1,8 @@
 ;; Machine description for SPARC chip for GCC
 ;;  Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-;;  1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+;;  1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
 ;;  Contributed by Michael Tiemann (tiemann@cygnus.com)
-;;  64 bit SPARC V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
+;;  64-bit SPARC-V9 support by Michael Tiemann, Jim Wilson, and Doug Evans,
 ;;  at Cygnus Support.
 
 ;; This file is part of GCC.
 ;; We always work with constants here.
 (define_insn "*movhi_lo_sum"
   [(set (match_operand:HI 0 "register_operand" "=r")
-       (ior:HI (match_operand:HI 1 "arith_operand" "%r")
-                (match_operand:HI 2 "arith_operand" "I")))]
+       (ior:HI (match_operand:HI 1 "register_operand" "%r")
+                (match_operand:HI 2 "small_int" "I")))]
   ""
   "or\t%1, %2, %0")
 
index 59b18f7..e00e074 100644 (file)
@@ -1,3 +1,7 @@
+2004-01-30  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       * gcc.c-torture/compile/20040130-1.c: New test.
+
 2004-01-29  Geoffrey Keating  <geoffk@geoffk.org>
 
        * objc.dg/call-super-2.m: Include stddef.h for size_t.
diff --git a/gcc/testsuite/gcc.c-torture/compile/20040130-1.c b/gcc/testsuite/gcc.c-torture/compile/20040130-1.c
new file mode 100644 (file)
index 0000000..0edcea4
--- /dev/null
@@ -0,0 +1,24 @@
+/* PR target/11475 */
+/* Origin: <heinrich.brand@fujitsu-siemens.com> */
+
+/* This used to fail on SPARC because of a broken pattern.  */
+
+#pragma pack(2)
+
+struct
+{
+  unsigned char G936:7;
+  unsigned short G937:6;
+  unsigned int :4;
+  unsigned short :14;
+  unsigned int G938:8;
+  unsigned int :30;
+  unsigned short :16;
+  unsigned int :18;
+  unsigned short G939:9;
+} G928b;
+
+void TestG928(void)
+{
+  G928b.G936 |= G928b.G939;
+}