OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Backported from mainline
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.c-torture
/
execute
/
complex-1.c
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.0i);
35
if (__real__ x != -1.0)
36
abort ();
37
if (__imag__ x != 0.0)
38
abort ();
39
exit (0);
40
}