openmp: Fix signed/unsigned warning
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-116.c
blobdd926a0a87bedb329488ffacaa1fc8237a2af258
1 /* { dg-require-effective-target vect_int } */
2 /* { dg-additional-options "-fdump-tree-optimized-details-blocks" } */
3 /* Assuming we can vectorize char multiplication, here's an execute test. */
5 #include <stdarg.h>
6 #include "tree-vect.h"
8 extern void abort (void);
10 __attribute__ ((noinline))
11 void foo()
13 static unsigned char A[256], B[256], C[256];
14 int i;
16 for (i = 0; i < 256; ++i)
17 A[i] = B[i] = i;
19 for (i = 0; i < 256; ++i)
20 C[i] = A[i] * B[i];
22 #pragma GCC novector
23 for (i = 0; i < 256; ++i)
24 if (C[i] != (unsigned char)(i * i))
25 abort ();
28 int main()
30 check_vect ();
31 foo();
32 return 0;
35 /* { dg-final { scan-tree-dump-not "Invalid sum" "optimized" } } */