From 74cd6867e7086687664dd3828c87d7a8bce736cd Mon Sep 17 00:00:00 2001
From: Jeffrey A Law <law@cygnus.com>
Date: Tue, 26 May 1998 22:41:54 +0000
Subject: [PATCH] * gcc.c-torture/execute/980526-1.c: New test.

From-SVN: r20072
---
 gcc/testsuite/ChangeLog                       |  4 +++
 .../gcc.c-torture/execute/980526-1.c          | 35 +++++++++++++++++++
 2 files changed, 39 insertions(+)
 create mode 100644 gcc/testsuite/gcc.c-torture/execute/980526-1.c

diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 873d0043d4cb..fbcd0441c503 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+Tue May 26 23:40:40 1998  Jeffrey A Law  (law@cygnus.com)
+
+	* gcc.c-torture/execute/980526-1.c: New test.
+
 1998-05-26  Dave Love  <d.love@dl.ac.uk>
 
 	* g77.f-torture/execute/alpha2.f: Add runtime test.
diff --git a/gcc/testsuite/gcc.c-torture/execute/980526-1.c b/gcc/testsuite/gcc.c-torture/execute/980526-1.c
new file mode 100644
index 000000000000..491068f9b645
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/980526-1.c
@@ -0,0 +1,35 @@
+int expect_do1 = 1, expect_do2 = 2;
+ 
+static int doit(int x){
+  __label__ lbl1;
+  __label__ lbl2;
+  static int jtab_init = 0;
+  static void *jtab[2];
+ 
+  if(!jtab_init) {
+    jtab[0] = &&lbl1;
+    jtab[1] = &&lbl2;
+    jtab_init = 1;
+  }
+  goto *jtab[x];
+lbl1:
+  return 1;
+lbl2:
+  return 2;
+}
+ 
+static void do1(void) {
+  if (doit(0) != expect_do1)
+    abort ();
+}
+ 
+static void do2(void){
+  if (doit(1) != expect_do2)
+    abort ();
+}
+ 
+int main(void){
+  do1();
+  do2();
+  exit(0);
+}
-- 
GitLab