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
Add _FloatN, _FloatNx tests for __builtin_fpclassify.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
torture
/
pr61757.c
blob
9a921a06ca8165502187d9e4f7997751d9374d1f
1
/* { dg-do run } */
2
3
extern
void
abort
(
void
);
4
5
struct
X
{
void
*
p
;
int
res
; }
a
[
32
];
6
7
int
foo
(
unsigned
i
,
unsigned
n
,
void
*
q
)
8
{
9
if
(
i
+
1
<
n
&&
q
==
a
[
i
+
1
].
p
)
10
{
11
do
{
12
++
i
;
13
}
while
(
i
<
n
&&
q
==
a
[
i
].
p
);
14
--
i
;
15
return
a
[
i
].
res
;
16
}
17
else
18
return
a
[
i
].
res
;
19
}
20
21
int
main
()
22
{
23
int
x
;
24
a
[
0
].
p
= &
x
;
25
a
[
0
].
res
= -
1
;
26
a
[
1
].
p
= &
x
;
27
a
[
1
].
res
=
1
;
28
a
[
2
].
p
= (
void
*)
0
;
29
a
[
2
].
res
=
0
;
30
if
(
foo
(
0
,
3
, &
x
) !=
1
)
31
abort
();
32
return
0
;
33
}