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
builtin-has-attribute-4.c: Skip on 32-bit hppa*-*-hpux*.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
pr86314.c
blob
8962a3cf2ff7a89a19854773f5f6eece0950922e
1
// PR target/86314
2
// { dg-do run { target sync_int_long } }
3
// { dg-options "-O2" }
4
5
__attribute__
((
noinline
,
noclone
))
unsigned long
6
foo
(
unsigned long
*
p
)
7
{
8
unsigned long
m
=
1UL
<< ((*
p
&
1
) ?
1
:
0
);
9
unsigned long
n
=
__atomic_fetch_or
(
p
,
m
,
__ATOMIC_SEQ_CST
);
10
return
(
n
&
m
) ==
0
;
11
}
12
13
int
14
main
()
15
{
16
unsigned long
v
=
1
;
17
if
(
foo
(&
v
) !=
1
)
18
__builtin_abort
();
19
return
0
;
20
}