]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/23818 (ICE in dominated_by_p, at dominance.c:827)
authorJakub Jelinek <jakub@redhat.com>
Tue, 20 Sep 2005 15:29:42 +0000 (17:29 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 20 Sep 2005 15:29:42 +0000 (17:29 +0200)
PR tree-optimization/23818
* tree-stdarg.c (execute_optimize_stdarg): Call
calculate_dominance_info.

* gcc.dg/pr23818.c: New test.

From-SVN: r104455

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr23818.c [new file with mode: 0644]
gcc/tree-stdarg.c

index 5051fd6a57fb038340a12954e747ae53472030fc..3a6a8dd5cc939e2e95a3dd6dae2ce84627819f51 100644 (file)
@@ -1,3 +1,9 @@
+2005-09-20  Jakub Jelinek  <jakub@redhat.com>
+
+       PR tree-optimization/23818
+       * tree-stdarg.c (execute_optimize_stdarg): Call
+       calculate_dominance_info.
+
 2005-09-18  Daniel Berlin  <dberlin@dberlin.org>
 
        * tree-data-ref.c (get_number_of_iters_for_loop): New function.
index f91da85168639c1edb3c73e36c34f25a96173f19..e4561999bd322661781f024f040749f918e15c91 100644 (file)
@@ -1,3 +1,8 @@
+2005-09-20  Jakub Jelinek  <jakub@redhat.com>
+
+       PR tree-optimization/23818
+       * gcc.dg/pr23818.c: New test.
+
 2005-09-20  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
 
        PR fortran/23420
diff --git a/gcc/testsuite/gcc.dg/pr23818.c b/gcc/testsuite/gcc.dg/pr23818.c
new file mode 100644 (file)
index 0000000..be0bb9a
--- /dev/null
@@ -0,0 +1,33 @@
+/* PR tree-optimization/23818 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-tree-dominator-opts" } */
+
+#include <stdarg.h>
+
+extern void abort (void);
+
+void
+foo (int p[100], int k, ...)
+{
+  int j, *q;
+  va_list ap;
+
+  va_start (ap, k);
+  q = va_arg (ap, int *);
+  for (j = 0; j < 100; j++)
+    q[j] = p[j] + 10;
+  va_end(ap);
+}
+
+int
+main (void)
+{
+  int buf[100], buf2[100], i;
+  for (i = 0; i < 100; i++)
+    buf[i] = i + 1;
+  foo (buf, 0, buf2);
+  for (i = 0; i < 100; i++)
+    if (buf2[i] != buf[i] + 10)
+      abort ();
+  return 0;
+}
index a7446585b63ed5049b96a3c9398420d06ac42051..c68e7b58c2cd7b731ee4ebfdf71506c7bd95a0ea 100644 (file)
@@ -734,6 +734,8 @@ execute_optimize_stdarg (void)
   if (va_list_simple_ptr)
     cfun->va_list_fpr_size = VA_LIST_MAX_FPR_SIZE;
 
+  calculate_dominance_info (CDI_DOMINATORS);
+
   FOR_EACH_BB (bb)
     {
       block_stmt_iterator i;
This page took 0.106033 seconds and 5 git commands to generate.