openmp: Fix signed/unsigned warning
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-early-break_110-pr113467.c
blob12d0ea1e871b51742c040c909ea5741bc820206e
1 /* { dg-add-options vect_early_break } */
2 /* { dg-require-effective-target vect_early_break } */
3 /* { dg-require-effective-target vect_long_long } */
5 /* { dg-final { scan-tree-dump-not "LOOP VECTORIZED" "vect" } } */
7 #include "tree-vect.h"
8 #include <stdint.h>
10 typedef struct gcry_mpi *gcry_mpi_t;
11 struct gcry_mpi {
12 int nlimbs;
13 uint64_t *d;
16 long gcry_mpi_add_ui_up;
17 void gcry_mpi_add_ui(gcry_mpi_t w, gcry_mpi_t u, unsigned v) {
18 gcry_mpi_add_ui_up = *w->d;
19 if (u) {
20 uint64_t *res_ptr = w->d, *s1_ptr = w->d;
21 int s1_size = u->nlimbs;
22 unsigned s2_limb = v, x = *s1_ptr++;
23 s2_limb += x;
24 *res_ptr++ = s2_limb;
25 if (x)
26 while (--s1_size) {
27 x = *s1_ptr++ + 1;
28 *res_ptr++ = x;
29 if (x) {
30 break;
36 int main()
38 check_vect ();
40 static struct gcry_mpi sv;
41 static uint64_t vals[] = {4294967288ULL, 191ULL, 4160749568ULL, 4294963263ULL,
42 127ULL, 4294950912ULL, 255ULL, 4294901760ULL,
43 534781951ULL, 33546240ULL, 4294967292ULL, 4294960127ULL,
44 4292872191ULL, 4294967295ULL, 4294443007ULL, 3ULL};
45 gcry_mpi_t v = &sv;
46 v->nlimbs = 16;
47 v->d = vals;
49 gcry_mpi_add_ui(v, v, 8);
50 if (v->d[1] != 192)
51 __builtin_abort();