summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.gdbtk/simple.c
blob: 969f6880636120cd89e0e46444b48061bcd80d1a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
int
main(int argc, char * argv[])
{
   int i;
   char *a;
   char *b = "abc";
   long  foo;

   a = (char *) malloc (300);

   for (i=0; i < 50; i++)
     {
       int j = i % 3;
       int k = 3 - j;
       strncpy (&a[i], &b[k], j);
       foo = (long) j * k / i + 2 * k * k * k;
     }
   return 0;
}