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
* expmed.c (flip_storage_order): Deal with complex modes specially.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
complex-1.c
blob
59101796475c87b7b537331243e301e8cf9eb442
1
double
2
g0
(
double
x
)
3
{
4
return
1.0
;
5
}
6
7
double
8
g1
(
double
x
)
9
{
10
return
-
1.0
;
11
}
12
13
double
14
g2
(
double
x
)
15
{
16
return
0.0
;
17
}
18
19
__complex__
double
20
xcexp
(
__complex__
double
x
)
21
{
22
double
r
;
23
24
r
=
g0
(
__real__ x
);
25
__real__ x
=
r
*
g1
(
__imag__ x
);
26
__imag__ x
=
r
*
g2
(
__imag__ x
);
27
return
x
;
28
}
29
30
main
()
31
{
32
__complex__
double
x
;
33
34
x
=
xcexp
(
1.0
i
);
35
if
(
__real__ x
!= -
1.0
)
36
abort
();
37
if
(
__imag__ x
!=
0.0
)
38
abort
();
39
exit
(
0
);
40
}