diff --git a/gcc/testsuite/gcc.dg/torture/pr102149.c b/gcc/testsuite/gcc.dg/torture/pr102149.c new file mode 100644 index 0000000000000000000000000000000000000000..34a8c213133cebe72d895ac2436ac77247e80377 --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr102149.c @@ -0,0 +1,19 @@ +/* { dg-do run } */ +/* { dg-additional-options "-fno-vect-cost-model" } */ + +int a[8]; +int *b = &a[6]; +char c; +int main() +{ + int d = 7; + for (; d >= 0; d--) + { + *b = 1; + c = a[d] >> 3; + a[d] = c; + } + if (a[6] != 1) + __builtin_abort (); + return 0; +}