repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Skip analyzer strndup test on hppa*-*-hpux*
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr103721-2.c
blob
e059b1cfc2df81212933a42ca07fbc8f7ee35ac7
1
// { dg-do run }
2
// { dg-require-effective-target thread_fence }
3
// { dg-options "-O2" }
4
5
extern
void
abort
();
6
struct
S
{
int
x
; }
a
[
10
];
7
struct
S
*
b
;
8
9
int
10
main
()
11
{
12
int
i
,
j
=
0
;
13
struct
S
*
q
=
a
;
14
15
for
(
i
=
100
; --
i
>
0
; )
16
{
17
struct
S
*
p
;
18
j
++;
19
if
(
j
>=
10
)
20
j
=
0
;
21
p
= &
a
[
j
];
22
23
if
(
p
==
q
)
24
abort
();
25
__atomic_thread_fence
(
__ATOMIC_SEQ_CST
);
26
q
=
p
;
27
}
28
return
0
;
29
}