fortran/trans-openmp.cc: Use the correct member in gfc_omp_namelist [PR118745]
[official-gcc.git] / gcc / testsuite / gcc.dg / vect / vect-live-4.c
blob170927802d2d8f1c42890f3c82f9dabd18eb2f38
1 /* Disabling epilogues until we find a better way to deal with scans. */
2 /* { dg-additional-options "--param vect-epilogues-nomask=0" } */
3 /* { dg-require-effective-target vect_int } */
5 #include "tree-vect.h"
7 /* Statement used outside the loop, not used inside the loop. SCEV cannot
8 hoist the stmt. */
9 __attribute__ ((noinline)) int
10 liveloop (int n, int *x, int *y)
12 int i;
13 int ret;
15 for (i = 0; i < n; ++i)
17 ret = x[i] + 5;
18 y[i] = ret;
20 return ret;
23 #define MAX 273
25 int
26 main (void)
28 int a[MAX];
29 int b[MAX];
30 int i;
32 check_vect ();
34 for (i=0; i<MAX; i++)
36 __asm__ volatile ("");
37 a[i] = i;
40 int ret = liveloop (MAX, a, b);
42 if (ret != MAX + 4)
43 abort ();
45 #pragma GCC novector
46 for (i=0; i<MAX; i++)
48 __asm__ volatile ("");
49 if (b[i] != i+5)
50 abort ();
54 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
55 /* { dg-final { scan-tree-dump-times "vec_stmt_relevant_p: stmt live but not relevant" 1 "vect" } } */