PR target/55146
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-116.c
blobf59e8abf9f562886282d8651f268187204a4fc65
1 /* { dg-require-effective-target vect_int } */
2 /* Assuming we can vectorize char multiplication, here's an execute test. */
4 #include <stdarg.h>
5 #include "tree-vect.h"
7 extern void abort (void);
9 __attribute__ ((noinline))
10 void foo()
12 static unsigned char A[256], B[256], C[256];
13 int i;
15 for (i = 0; i < 256; ++i)
16 A[i] = B[i] = i;
18 for (i = 0; i < 256; ++i)
19 C[i] = A[i] * B[i];
21 for (i = 0; i < 256; ++i)
22 if (C[i] != (unsigned char)(i * i))
23 abort ();
26 int main()
28 check_vect ();
29 foo();
30 return 0;
33 /* { dg-final { cleanup-tree-dump "vect" } } */