aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/sum.c
blob: 3e27fa1a41a19eba2d960078710ea482029da9a6 (plain)
1
2
3
4
5
6
7
8
9
10
/* This is a sample program for the HP/DDE debugger. */
#include <stdio.h>

int sum(int *list, int low, int high)
    {
        int i = 0, s = 0;	/* stop-in-sum */
        for (i = low; i <= high; i++)
            s += list[i];
        return(s);
    }