* gcc.dg/m68k-slp-ice.c: New test for PR c/7872.
authorJames E Wilson <wilson@tuliptree.org>
Tue, 4 Mar 2003 04:30:51 +0000 (20:30 -0800)
committerJim Wilson <wilson@gcc.gnu.org>
Tue, 4 Mar 2003 04:30:51 +0000 (20:30 -0800)
From-SVN: r63763

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/m68k-slp-ice.c [new file with mode: 0644]

index 926b42e..22470c3 100644 (file)
@@ -1,3 +1,7 @@
+2003-03-03  James E Wilson  <wilson@tuliptree.org>
+
+       * gcc.dg/m68k-slp-ice.c: New test for PR c/7872.
+
 2003-03-03  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/9878
diff --git a/gcc/testsuite/gcc.dg/m68k-slp-ice.c b/gcc/testsuite/gcc.dg/m68k-slp-ice.c
new file mode 100644 (file)
index 0000000..61c7f9d
--- /dev/null
@@ -0,0 +1,15 @@
+/* From PR 7872, test for optabs segfault when strict low part is present.  */
+/* { dg-do compile { target m68k-*-* } }  */
+/* { dg-options "-O0" }  */
+extern void (**table)(void);
+
+typedef unsigned short uw16;
+typedef unsigned int gshort;
+
+register uw16 *pc asm("%a4");
+register gshort code asm("%d6");
+
+void QMExecuteLoop(uw16 *oldPC)
+{
+  table[code=(*(uw16*)(pc++))]();
+}