diff options
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/vect/pr60196-2.c')
-rw-r--r-- | gcc-4.9/gcc/testsuite/gcc.dg/vect/pr60196-2.c | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/vect/pr60196-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/vect/pr60196-2.c new file mode 100644 index 000000000..b2059c20c --- /dev/null +++ b/gcc-4.9/gcc/testsuite/gcc.dg/vect/pr60196-2.c @@ -0,0 +1,33 @@ +/* PR tree-optimization/63189 */ +/* { dg-do run } */ + +#include "tree-vect.h" + +static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 }; +static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 }; + +__attribute__((noinline, noclone)) static int +bar (void) +{ + int sum = 0, i; + for (i = 0; i < 8; ++i) + sum += a[i] * b[i]; + return sum; +} + +__attribute__((noinline, noclone)) void +foo (void) +{ + if (bar () != 0) + abort (); +} + +int +main () +{ + check_vect (); + foo (); + return 0; +} + +/* { dg-final { cleanup-tree-dump "vect" } } */ |