projects
/
libfirm
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
5272152
)
don't crash with missing argument
author
Matthias Braun
<matze@braunis.de>
Thu, 7 Sep 2006 11:33:35 +0000
(11:33 +0000)
committer
Matthias Braun
<matze@braunis.de>
Thu, 7 Sep 2006 11:33:35 +0000
(11:33 +0000)
ir/be/test/langshootout/n-body.c
patch
|
blob
|
history
diff --git
a/ir/be/test/langshootout/n-body.c
b/ir/be/test/langshootout/n-body.c
index
c1aa2e4
..
7081537
100644
(file)
--- a/
ir/be/test/langshootout/n-body.c
+++ b/
ir/be/test/langshootout/n-body.c
@@
-129,9
+129,12
@@
struct planet bodies[NBODIES] = {
int main(int argc, char ** argv)
{
- int n =
atoi(argv[1])
;
+ int n =
1000000
;
int i;
+ if(argc > 1)
+ n = atoi(argv[1]);
+
offset_momentum(NBODIES, bodies);
printf ("%.9f\n", energy(NBODIES, bodies));
for (i = 1; i <= n; i++)