Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.c-torture/execute/pr82954.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | |
children |
rev | line source |
---|---|
131 | 1 /* PR tree-optimization/82954 */ |
2 | |
3 __attribute__((noipa)) void | |
4 foo (int *__restrict p, int *__restrict q) | |
5 { | |
6 p[0] = p[0] ^ 1; | |
7 p[1] = p[1] ^ 2; | |
8 p[2] = p[2] ^ q[2]; | |
9 p[3] = p[3] ^ q[3]; | |
10 } | |
11 | |
12 int | |
13 main () | |
14 { | |
15 int p[4] = { 16, 32, 64, 128 }; | |
16 int q[4] = { 8, 4, 2, 1 }; | |
17 asm volatile ("" : : "g" (p), "g" (q) : "memory"); | |
18 foo (p, q); | |
19 if (p[0] != 17 || p[1] != 34 || p[2] != 66 || p[3] != 129) | |
20 __builtin_abort (); | |
21 return 0; | |
22 } |