]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc.c-torture/execute/20010106-1.c: New test.
authoraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 6 Jan 2001 23:15:05 +0000 (23:15 +0000)
committeraoliva <aoliva@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 6 Jan 2001 23:15:05 +0000 (23:15 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38753 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.c-torture/execute/20010106-1.c [new file with mode: 0644]

index 2ca4f17588400748e9d2e0214a0789a281e89427..e8051c8723952319d31a64f5fb2979cd660fe01f 100644 (file)
@@ -1,3 +1,7 @@
+2001-01-06  Alexandre Oliva  <aoliva@redhat.com>
+
+       * gcc.c-torture/execute/20010106-1.c: New test.
+
 2001-01-06  Joseph S. Myers  <jsm28@cam.ac.uk>
 
        * gcc.dg/format/format.exp: New file.
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010106-1.c b/gcc/testsuite/gcc.c-torture/execute/20010106-1.c
new file mode 100644 (file)
index 0000000..9e149c3
--- /dev/null
@@ -0,0 +1,30 @@
+/* Copyright 2001 Free Software Foundation
+   Contributed by Alexandre Oliva <aoliva@redhat.com> */
+
+int f(int i) {
+  switch (i)
+  {
+    case -2:
+      return 33;
+    case -1:
+      return 0;
+    case 0:
+      return 7;
+    case 1:
+      return 4;
+    case 2:
+      return 3;
+    case 3:
+      return 15;
+    case 4:
+     return 9;
+    default:
+      abort ();
+  }
+}
+
+int main() {
+  if (f(-1))
+    abort ();
+  exit (0);
+}