re PR tree-optimization/36508 (ICE in compute_antic)

PR tree-optimization/36508
	* tree-ssa-pre.c (compute_antic): Allow num_iterations up to
	499, don't check it at all in release compilers.

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

From-SVN: r137036
This commit is contained in:
Jakub Jelinek 2008-06-23 13:51:34 +02:00 committed by Jakub Jelinek
parent 836cd1da10
commit 53983ae9f3
4 changed files with 46 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2008-06-23 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/36508
* tree-ssa-pre.c (compute_antic): Allow num_iterations up to
499, don't check it at all in release compilers.
2008-06-23 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.md (*fop_<mode>_1_i387): Use SSE_FLOAT_MODE_P

View File

@ -1,3 +1,8 @@
2008-06-23 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/36508
* gcc.dg/pr36508.c: New test.
2008-06-20 Joseph Myers <joseph@codesourcery.com>
* gcc.dg/inline-31.c: New test.

View File

@ -0,0 +1,29 @@
/* PR tree-optimization/36508 */
/* { dg-do compile } */
/* { dg-options "-O -ftree-pre" } */
void
foo (short *sp)
{
int k;
k = 1;
#define SP0 *sp++ = 1;
while (1)
{
if (k > 6)
break;
SP0
k++;
}
k = 1;
while (1)
{
if (k > 6)
break;
SP0
k++;
}
#define SP1 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0 SP0
#define SP2 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1 SP1
SP2
}

View File

@ -2094,8 +2094,10 @@ compute_antic (void)
block->index));
}
}
#ifdef ENABLE_CHECKING
/* Theoretically possible, but *highly* unlikely. */
gcc_assert (num_iterations < 50);
gcc_assert (num_iterations < 500);
#endif
}
statistics_histogram_event (cfun, "compute_antic iterations",
@ -2124,8 +2126,10 @@ compute_antic (void)
block->index));
}
}
#ifdef ENABLE_CHECKING
/* Theoretically possible, but *highly* unlikely. */
gcc_assert (num_iterations < 50);
gcc_assert (num_iterations < 500);
#endif
}
statistics_histogram_event (cfun, "compute_partial_antic iterations",
num_iterations);