Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/gcc.dg/pr94368.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 /* PR target/94368 */ | |
2 /* { dg-do compile { target fpic } } */ | |
3 /* { dg-options "-fpic -O1 -fcommon" } */ | |
4 | |
5 int b, c, d, e, f, h; | |
6 short g; | |
7 int foo (int) __attribute__ ((__const__)); | |
8 | |
9 void | |
10 bar (void) | |
11 { | |
12 while (1) | |
13 { | |
14 while (1) | |
15 { | |
16 __atomic_load_n (&e, 0); | |
17 if (foo (2)) | |
18 __sync_val_compare_and_swap (&c, 0, f); | |
19 b = 1; | |
20 if (h == e) | |
21 break; | |
22 } | |
23 __sync_val_compare_and_swap (&g, -1, f); | |
24 } | |
25 } |