* gcc.c-torture/execute/990513-1.c: New test.
authorAndreas Schwab <schwab@issan.cs.uni-dortmund.de>
Thu, 13 May 1999 01:03:24 +0000 (01:03 +0000)
committerJeff Law <law@gcc.gnu.org>
Thu, 13 May 1999 01:03:24 +0000 (19:03 -0600)
From-SVN: r26919

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

index ad7617cf77514b34a715ae7782dca5acf5c6eb79..4eb48878f3b7aecbea24ac3bc1d750a5487dcf08 100644 (file)
@@ -1,3 +1,7 @@
+Thu May 13 02:02:46 1999  Andreas Schwab <schwab@issan.cs.uni-dortmund.de>
+
+       * gcc.c-torture/execute/990513-1.c: New test.
+
 1999-05-10  Richard Henderson  <rth@cygnus.com>
 
        * g++.old-deja/g++.other/null1.C (g): Add overload for long.
diff --git a/gcc/testsuite/gcc.c-torture/execute/990513-1.c b/gcc/testsuite/gcc.c-torture/execute/990513-1.c
new file mode 100644 (file)
index 0000000..6ad228f
--- /dev/null
@@ -0,0 +1,26 @@
+#include <string.h>
+
+void foo (int *BM_tab, int j)
+{
+  int *BM_tab_base;
+
+  BM_tab_base = BM_tab;
+  BM_tab += 0400;
+  while (BM_tab_base != BM_tab)
+    {
+      *--BM_tab = j;
+      *--BM_tab = j;
+      *--BM_tab = j;
+      *--BM_tab = j;
+    }
+}
+
+int main ()
+{
+  int BM_tab[0400];
+  memset (BM_tab, 0, sizeof (BM_tab));
+  foo (BM_tab, 6);
+  if (BM_tab[0] != 6)
+    abort ();
+  return 0;
+}