re PR tree-optimization/47060 (ICE: SIGSEGV in reduction_phi (tree-parloops.c:212) with -O -ffast-math -ftree-parallelize-loops=2 -fno-tree-dce)
PR tree-optimization/47060 * tree-parloops.c (reduction_phi): Return NULL if PHI is NULL. * gcc.dg/autopar/pr47060.c: New test. From-SVN: r168336
This commit is contained in:
parent
dad6bca98a
commit
87ebde38c0
4 changed files with 32 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-12-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/47060
|
||||
* tree-parloops.c (reduction_phi): Return NULL if PHI is NULL.
|
||||
|
||||
2010-12-29 Paul Koning <ni1d@arrl.net>
|
||||
|
||||
* config/pdp11/pdp11-protos.h (pdp11_asm_output_var): Declare.
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
2010-12-30 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR tree-optimization/47060
|
||||
* gcc.dg/autopar/pr47060.c: New test.
|
||||
|
||||
2010-12-30 Nicola Pero <nicola.pero@meta-innovation.com>
|
||||
|
||||
* objc.dg/enhanced-proto-2.m: Updated.
|
||||
|
|
21
gcc/testsuite/gcc.dg/autopar/pr47060.c
Normal file
21
gcc/testsuite/gcc.dg/autopar/pr47060.c
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* PR tree-optimization/47060 */
|
||||
/* { dg-do compile } */
|
||||
/* { dg-options "-O -ffast-math -ftree-parallelize-loops=2 -fno-tree-dce" } */
|
||||
|
||||
struct S
|
||||
{
|
||||
int n;
|
||||
float *a;
|
||||
};
|
||||
|
||||
float
|
||||
foo (struct S *b)
|
||||
{
|
||||
float c, d;
|
||||
int j;
|
||||
for (j = 0; j < b->n; j++)
|
||||
d += b->a[j];
|
||||
for (j = 0; j < b->n; j++)
|
||||
c += b->a[j];
|
||||
return d;
|
||||
}
|
|
@ -201,7 +201,7 @@ reduction_phi (htab_t reduction_list, gimple phi)
|
|||
{
|
||||
struct reduction_info tmpred, *red;
|
||||
|
||||
if (htab_elements (reduction_list) == 0)
|
||||
if (htab_elements (reduction_list) == 0 || phi == NULL)
|
||||
return NULL;
|
||||
|
||||
tmpred.reduc_phi = phi;
|
||||
|
|
Loading…
Add table
Reference in a new issue