aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-prefetch.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2008-06-24 12:06:17 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2008-06-24 12:06:17 +0200
commita80a27015e7a09109ace946db74b780532267f66 (patch)
tree492ca505f095f3121d8bf401e35946ec7b71fd17 /gcc/tree-ssa-loop-prefetch.c
parent190a9bd7ee25cd212923a48cae0cb390a96099bb (diff)
downloadgcc-a80a27015e7a09109ace946db74b780532267f66.zip
gcc-a80a27015e7a09109ace946db74b780532267f66.tar.gz
gcc-a80a27015e7a09109ace946db74b780532267f66.tar.bz2
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
Diffstat (limited to 'gcc/tree-ssa-loop-prefetch.c')
-rw-r--r--gcc/tree-ssa-loop-prefetch.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index 651ccbb..14044c4 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -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;