]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* gcc.dg/20050330-2.c: New test.
authorJakub Jelinek <jakub@redhat.com>
Thu, 8 Dec 2005 21:44:27 +0000 (22:44 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 8 Dec 2005 21:44:27 +0000 (22:44 +0100)
From-SVN: r108243

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

index 4bc6e51edaa7abd8f957f7a279dc8ef433b3d27c..0fc0ea058a9b268f0af9c76db2ea853695fde4f5 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;
+}