Commit a80a2701 by Jakub Jelinek Committed by Jakub Jelinek

re PR tree-optimization/36504 (ICE when building xorg-server with -O3 -fprefetch-loop-arrays)

	PR tree-optimization/36504
	* tree-ssa-loop-prefetch.c (gather_memory_references_ref): Skip
	references without base address.

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

From-SVN: r137061
parent 190a9bd7
2008-06-24 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/36504
* tree-ssa-loop-prefetch.c (gather_memory_references_ref): Skip
references without base address.
2008-06-23 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/PR36584
......
2008-06-24 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/36504
* gcc.dg/pr36504.c: New test.
2008-06-23 Uros Bizjak <ubizjak@gmail.com>
PR middle-end/PR36584
......
/* PR tree-optimization/36504 */
/* { dg-do compile } */
/* { dg-options "-O3 -fprefetch-loop-arrays" } */
struct A { struct { int a; } b[8]; };
struct B { int c; int d; };
struct C { struct B d; };
void bar (struct C *, int);
struct B
foo (struct C *p, struct A *e, int b)
{
struct B q;
bar (p, e->b[b].a);
return q;
}
void
baz (int b, struct A *e)
{
struct C p;
for (; b; ++b)
p.d = foo (&p, e, b);
}
......@@ -457,6 +457,9 @@ gather_memory_references_ref (struct loop *loop, struct mem_ref_group **refs,
HOST_WIDE_INT step, delta;
struct mem_ref_group *agrp;
if (get_base_address (ref) == NULL)
return false;
if (!analyze_ref (loop, &ref, &base, &step, &delta, stmt))
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment