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
2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.target
/
i386
/
pr67995-1.c
blob
072b1fe787db8c1f4d8abc5a87b12a81b55f084e
1
/* { dg-do compile } */
2
/* { dg-options "-O2 -march=haswell" } */
3
4
unsigned int
5
__attribute__
((
target
(
"arch=core2"
)))
6
__x86_rdrand
(
void
)
7
{
8
unsigned int
retries
=
100
;
9
unsigned int
val
;
10
11
while
(
__builtin_ia32_rdrand32_step
(&
val
) ==
0
)
/* { dg-error "needs isa option" } */
12
if
(--
retries
==
0
)
13
return
0
;
14
15
return
val
;
16
}