From 41d1c8ddaf0e1a76896a7e0101b8f3bb5eb4bd8e Mon Sep 17 00:00:00 2001 From: Richard Guenther Date: Thu, 15 May 2008 14:09:11 +0000 Subject: [PATCH] re PR tree-optimization/36245 (internal compiler error: in build2_stat, at tree.c:3116) 2008-05-15 Richard Guenther PR tree-optimization/36245 * tree-ssa-address.c (add_to_parts): Deal with non-pointer bases. * gcc.c-torture/compile/pr36245.c: New testcase. From-SVN: r135361 --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.c-torture/compile/pr36245.c | 21 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 gcc/testsuite/gcc.c-torture/compile/pr36245.c diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c2af14e25bd..fae0f99623b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2008-05-15 Richard Guenther + + PR tree-optimization/36245 + * gcc.c-torture/compile/pr36245.c: New testcase. + 2008-05-15 Richard Guenther * gcc.dg/tree-ssa/loadpre7.c: Adjust scan for not performed diff --git a/gcc/testsuite/gcc.c-torture/compile/pr36245.c b/gcc/testsuite/gcc.c-torture/compile/pr36245.c new file mode 100644 index 00000000000..37598753950 --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/compile/pr36245.c @@ -0,0 +1,21 @@ +extern char buf1[10]; +extern char buf2[10]; +extern void b(int i, int j, int w); + +void a() { + int i,j; + char *p; + int w; + + p = buf1; + for(j = 0;j < 10; j++) { + for(i = 0;i < 10; i++) { + w = *p; + if(w != 1) { + w = buf2[p - buf1]; + b(i*2+1, j, w); + } + p++; + } + } +} -- 2.30.2