From bb8a97154cde6c47e64fb2792cec802e97e23398 Mon Sep 17 00:00:00 2001 From: rguenth Date: Tue, 5 Sep 2006 08:34:00 +0000 Subject: 2006-09-05 Richard Guenther PR middle-end/28935 * tree-ssa-ccp.c (fold_stmt_r): Make sure to fold the condition of a COND_EXPR. * gcc.dg/pr28935.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116695 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/testsuite/gcc.dg/pr28935.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 gcc/testsuite/gcc.dg/pr28935.c (limited to 'gcc/testsuite/gcc.dg/pr28935.c') diff --git a/gcc/testsuite/gcc.dg/pr28935.c b/gcc/testsuite/gcc.dg/pr28935.c new file mode 100644 index 00000000000..9a0e70ecf68 --- /dev/null +++ b/gcc/testsuite/gcc.dg/pr28935.c @@ -0,0 +1,15 @@ +/* { dg-do compile } */ +/* { dg-options "-O3 -ftree-vectorize" } */ + +int col[8]; +int extend_options(int w, int h, int *map, int x, int y, int index) +{ + int dx, dy; + for (dx = -1; dx <= +1; dx++) + { + int index = (dy < 0 ? 6-dx : dy > 0 ? 2+dx : 2*(1+dx)); + if (x+dx >= 0 && x+dx < w && y+dy >= 0 && y+dy < h) + col[index] = map[(y+dy)*w+(x+dx)]; + col[index] = -1; + } +} -- cgit v1.2.1