testsuite: Revert to the original version of pr100056.c
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / wrapv-vect-7.c
blob2a557f697e11520eb6101acf87006b3d2b7f9722
1 /* { dg-additional-options "-fwrapv" } */
2 /* { dg-require-effective-target vect_int } */
3 /* { dg-add-options bind_pic_locally } */
5 #include <stdarg.h>
6 #include "tree-vect.h"
8 #define N 128
10 short sa[N];
11 short sb[N];
13 int main1 ()
15 int i;
17 for (i = 0; i < N; i++)
19 sb[i] = 5;
22 /* check results: */
23 #pragma GCC novector
24 for (i = 0; i < N; i++)
26 if (sb[i] != 5)
27 abort ();
30 for (i = 0; i < N; i++)
32 sa[i] = sb[i] + (short)100;
35 /* check results: */
36 #pragma GCC novector
37 for (i = 0; i < N; i++)
39 if (sa[i] != 105)
40 abort ();
43 return 0;
46 int main (void)
48 check_vect ();
50 return main1 ();
53 /* Fails for 32-bit targets that don't vectorize PLUS. */
54 /* { dg-final { scan-tree-dump-times "vectorized 2 loops" 1 "vect" } } */
55 /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned access" 0 "vect" } } */