From: Jakub Jelinek Date: Mon, 23 Jun 2008 11:51:34 +0000 (+0200) Subject: re PR tree-optimization/36508 (ICE in compute_antic) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=53983ae9f340b1378e9aae93728c6bc2e62d4317;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b91ebd197bc..409f5040a24 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-06-23 Jakub Jelinek + + 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 * config/i386/i386.md (*fop__1_i387): Use SSE_FLOAT_MODE_P diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 71de4be63ce..1eaff577cc7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-06-23 Jakub Jelinek + + PR tree-optimization/36508 + * gcc.dg/pr36508.c: New test. + 2008-06-20 Joseph Myers * gcc.dg/inline-31.c: New test. diff --git a/gcc/testsuite/gcc.dg/pr36508.c b/gcc/testsuite/gcc.dg/pr36508.c new file mode 100644 index 00000000000..30489923642 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr36508.c @@ -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 +} diff --git a/gcc/tree-ssa-pre.c b/gcc/tree-ssa-pre.c index 3f3aae777e1..423afe04785 100644 --- a/gcc/tree-ssa-pre.c +++ b/gcc/tree-ssa-pre.c @@ -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);