OSDN Git Service

* gcc.c-torture/execute/20001130-2.c: New testcase.
authorgeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Dec 2000 00:15:29 +0000 (00:15 +0000)
committergeoffk <geoffk@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 1 Dec 2000 00:15:29 +0000 (00:15 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@37902 138bc75d-0d04-0410-961f-82ee72b054a4

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

index f9c90e2..3363678 100644 (file)
@@ -1,3 +1,7 @@
+2000-11-30  Geoffrey Keating  <geoffk@redhat.com>
+
+       * gcc.c-torture/execute/20001130-2.c: New testcase.
+
 2000-11-30  Richard Henderson  <rth@redhat.com>
 
        * gcc.c-torture/execute/20001130-1.c: New test.
diff --git a/gcc/testsuite/gcc.c-torture/execute/20001130-2.c b/gcc/testsuite/gcc.c-torture/execute/20001130-2.c
new file mode 100644 (file)
index 0000000..c4ef6c7
--- /dev/null
@@ -0,0 +1,31 @@
+static int which_alternative = 3;
+
+static const char *i960_output_ldconst (void);
+
+static const char *
+output_25 (void)
+{
+  switch (which_alternative)
+    {
+    case 0:
+      return "mov      %1,%0";
+    case 1:
+      return i960_output_ldconst ();
+    case 2:
+      return "ld       %1,%0";
+    case 3:
+      return "st       %1,%0";      
+    }
+}
+
+static const char *i960_output_ldconst (void)
+{
+  return "foo";
+}
+int main(void)
+{
+  const char *s = output_25 () ;
+  if (s[0] != 's')
+    abort ();
+  exit (0);
+}