* gcc.dg/20021116-1.c: New test.
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Nov 2002 20:04:40 +0000 (20:04 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 16 Nov 2002 20:04:40 +0000 (20:04 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@59178 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/20021116-1.c [new file with mode: 0644]

index 3caf7d8..ca431f1 100644 (file)
@@ -1,3 +1,7 @@
+2002-11-16  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc.dg/20021116-1.c: New test.
+
 2002-11-14  Mark Mitchell  <mark@codesourcery.com>
 
        * g++.dg/abi/vcall1.C: New test.
diff --git a/gcc/testsuite/gcc.dg/20021116-1.c b/gcc/testsuite/gcc.dg/20021116-1.c
new file mode 100644 (file)
index 0000000..27a3e3a
--- /dev/null
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fpic" } */
+/* { dg-warning "not supported" "PIC unsupported" { target cris-*-elf* cris-*-aout* mmix-*-* } 0 } */
+
+void **
+foo (void **x, int y, void *z)
+{
+  switch (y)
+    {
+    case 162:
+      *x = z;
+      break;
+    case 164:
+      *x = z;
+      break;
+    case 165:
+      *x = z;
+      break;
+    case 166:
+      *x = z;
+      break;
+    case 163:
+      *x = z;
+      break;
+    default:
+      goto out;
+    }
+  return x;
+
+out:
+  return (void **) 0;
+}