re PR tree-optimization/23818 (ICE in dominated_by_p, at dominance.c:827)

PR tree-optimization/23818
	* tree-stdarg.c (execute_optimize_stdarg): Call
	calculate_dominance_info.

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

From-SVN: r104455
This commit is contained in:
Jakub Jelinek 2005-09-20 17:29:42 +02:00 committed by Jakub Jelinek
parent 7fd4d3123d
commit 18c57f2c94
4 changed files with 46 additions and 0 deletions

View 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.

View 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

View File

@ -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;
}

View 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;