re PR tree-optimization/32230 (Segfault in set_bb_for_stmt with -O -ftree-vectorize)

PR tree-optimization/32230
	PR tree-optimization/32477
	* tree-vect-analyze.c (vect_analyze_data_refs): Fail if base
	address is a constant.

From-SVN: r126196
This commit is contained in:
Ira Rosen 2007-07-02 10:27:27 +00:00 committed by Ira Rosen
parent e2c14f5d51
commit 3053ce4409
4 changed files with 45 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2007-07-02 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/32230
PR tree-optimization/32477
* tree-vect-analyze.c (vect_analyze_data_refs): Fail if base
address is a constant.
2007-07-02 Richard Sandiford <richard@codesourcery.com>
* config.gcc (mipsisa32-*-elf*, mipsisa32el-*-elf*)

View File

@ -1,3 +1,8 @@
2007-07-02 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/32230
* gcc.dg/vect/pr32230.c: New test.
2007-07-01 Christopher D. Rickett <crickett@lanl.gov>
* bind_c_array_params.f03: New files for Fortran 2003 ISO C Binding.

View File

@ -0,0 +1,24 @@
/* { dg-do compile } */
typedef struct filter_buffer filter_buffer_t;
struct filter_buffer
{
char buf[1];
};
typedef struct sbuf_header sbuf_header_t;
struct sbuf_header
{
char buf[1];
}
const_f (filter_buffer_t *buf)
{
float val;
int i;
for (i = 0; i < 10; i++)
((float*) (&((sbuf_header_t *) ((buf) == (filter_buffer_t *)&(buf)->buf[0]))->buf[0]))[i] = val;
}
/* { dg-final { cleanup-tree-dump "vect" } } */

View File

@ -2092,6 +2092,15 @@ vect_analyze_data_refs (loop_vec_info loop_vinfo)
}
return false;
}
if (TREE_CODE (DR_BASE_ADDRESS (dr)) == INTEGER_CST)
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))
fprintf (vect_dump, "not vectorized: base addr of dr is a "
"constant");
return false;
}
if (!DR_SYMBOL_TAG (dr))
{
if (vect_print_dump_info (REPORT_UNVECTORIZED_LOOPS))