Fortran: Fix PR 47485.
[gcc.git] / gcc / testsuite / g++.dg / torture / vect-absu-1.C
blob0b2035f638f566c791f3c3dbc517464a3502e068
1 // { dg-do run }
2 // PR middle-end/111285
4 // The lowering of vect absu was done incorrectly
6 #define vect1 __attribute__((vector_size(sizeof(int))))
8 #define negabs(a) a < 0 ? a : -a
10 __attribute__((noinline))
11 int s(int a)
13   return negabs(a);
15 __attribute__((noinline))
16 vect1 int v(vect1 int a)
18   return negabs(a);
21 int main(void)
23         for(int i = -10; i < 10; i++)
24         {
25           vect1 int t = {i};
26           if (v(t)[0] != s(i))
27             __builtin_abort();
28         }