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
libstdc++: Preserve signbit of nan when converting float to double [PR113578]
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
complex-3.c
blob
db119e24639a1c68c4e04e7d9afce86c9666aecb
1
void
abort
(
void
);
2
void
exit
(
int
);
3
4
struct complex
5
{
6
float
r
;
7
float
i
;
8
};
9
10
struct complex
cmplx
(
float
,
float
);
11
12
struct complex
13
f
(
float
a
,
float
b
)
14
{
15
struct complex
c
;
16
c
.
r
=
a
;
17
c
.
i
=
b
;
18
return
c
;
19
}
20
21
int
22
main
(
void
)
23
{
24
struct complex
z
=
f
(
1.0
,
0.0
);
25
26
if
(
z
.
r
!=
1.0
||
z
.
i
!=
0.0
)
27
abort
();
28
exit
(
0
);
29
}