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
* gcc.dg/20001117-1.c: Add main.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.dg
/
20001117-1.c
1
/* { dg-do run } */
2
/* { dg-options "-O2 -finstrument-functions" } */
3
4
double
5
foo (double a, double b)
6
{
7
double c;
8
if (0.0 < a)
9
c = a;
10
else if (b > 0.0)
11
c = 0.0;
12
else
13
return 0;
14
return 2.0 * (b - c);
15
}
16
17
int main ()
18
{
19
if (foo (1.0, 4.0) != 6.0)
20
abort ();
21
exit (0);
22
}