comparison gcc/testsuite/gcc.dg/torture/pr93868.c @ 152:2b5abeee2509

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
comparison
equal deleted inserted replaced
145:1830386684a0 152:2b5abeee2509
1 /* { dg-do run } */
2 /* { dg-additional-options "-ftree-vectorize" } */
3
4 unsigned a[1024];
5 unsigned b[1024];
6
7 void __attribute__((noipa))
8 foo (unsigned *q, unsigned *r)
9 {
10 unsigned sum1 = 0, sum2 = 0;
11 for (int i = 0; i < 512; ++i)
12 {
13 sum1 += a[2*i];
14 sum2 += a[2*i+1];
15 b[2*i] = a[2*i+1];
16 b[2*i+1] = a[2*i];
17 }
18 *q = sum1;
19 *r = sum2;
20 }
21
22 int main()
23 {
24 unsigned sum1, sum2;
25 a[0] = 0;
26 a[1] = 1;
27 foo (&sum1, &sum2);
28 if (b[0] != 1 || b[1] != 0)
29 __builtin_abort ();
30 return 0;
31 }