* gcc.dg/20050330-2.c: New test.
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Dec 2005 21:44:27 +0000 (21:44 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 8 Dec 2005 21:44:27 +0000 (21:44 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@108243 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 4bc6e51..0fc0ea0 100644 (file)
@@ -1,3 +1,7 @@
+2005-12-08  Jakub Jelinek  <jakub@redhat.com>
+
+       * gcc.dg/20050330-2.c: New test.
+
 2005-12-08  Erik Edelmann  <eedelman@gcc.gnu.org>
 
        PR fortran/25292
diff --git a/gcc/testsuite/gcc.dg/20050330-2.c b/gcc/testsuite/gcc.dg/20050330-2.c
new file mode 100644 (file)
index 0000000..d912ffd
--- /dev/null
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fprofile-generate" } */
+
+struct S
+{
+  int a;
+  void **b;
+};
+
+void
+foo (struct S *x, int y)
+{
+  if (!x)
+    return;
+  if (y >= x->a)
+    return;
+  x->a--;
+  for (; y < x->a; y++)
+    x->b[y] = x->b[y + 1];
+  x->b[x->a] = (void *) 0;
+}