* gcc.dg/20021116-1.c: New test.
authorJakub Jelinek <jakub@redhat.com>
Sat, 16 Nov 2002 20:04:40 +0000 (21:04 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Sat, 16 Nov 2002 20:04:40 +0000 (21:04 +0100)
From-SVN: r59178

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

index 3caf7d80132d5d55ae5489eecac20d2531fd6fe7..ca431f1aa96842f52787ba387f0aa62ecf6be0fa 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;
+}