diff options
author | Jason Molenda <jmolenda@apple.com> | 1999-06-28 23:04:32 +0000 |
---|---|---|
committer | Jason Molenda <jmolenda@apple.com> | 1999-06-28 23:04:32 +0000 |
commit | 74cf13956febb1f6c8e0f5d5f48814953d41dd28 (patch) | |
tree | f06240a34afca06791450a91c8aac297abda27df /gdb/testsuite/gdb.base/sum.c | |
parent | 9cd2c67bacb9aaa7e82457e68e1a6087c8bde928 (diff) | |
download | binutils-gdb-74cf13956febb1f6c8e0f5d5f48814953d41dd28.tar.gz |
import gdb-1999-06-28 snapshot
Diffstat (limited to 'gdb/testsuite/gdb.base/sum.c')
-rw-r--r-- | gdb/testsuite/gdb.base/sum.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/sum.c b/gdb/testsuite/gdb.base/sum.c new file mode 100644 index 00000000000..f5a5dbf2631 --- /dev/null +++ b/gdb/testsuite/gdb.base/sum.c @@ -0,0 +1,15 @@ +/* This is a sample program for the HP/DDE debugger. */ +#include <stdio.h> + +#ifdef PROTOTYPES +int sum(int *list, int low, int high) +#else +int sum(list, low, high) +int *list, low, high; +#endif + { + int i = 0, s = 0; + for (i = low; i <= high; i++) + s += list[i]; + return(s); + } |