]> andersk Git - splint.git/blob - test/tests2.5/hoof.c
Fixed stupid bug in constraintList causing a segfault.
[splint.git] / test / tests2.5 / hoof.c
1 #include <stdio.h>
2
3 static void test (long int x);
4 static void init_arr(/*@out@*/ float[],/*@out@*/ long int*);
5
6 int main(void)
7 {
8   int j;
9   long i;
10   float arr[2];
11
12   init_arr(arr,&j);
13   test (j);
14
15   for( i=0; i < j; i++ ) {
16     printf("%ld %d: %.6e\n",i,j,arr[i]);
17   }
18   return(0);
19 }
20
21 void init_arr(float arr[],
22               long int *j)
23 {
24         long i;
25
26         *j = 2L;
27         for( i=0; i < 2L; i++ ) {
28                 arr[i] = (float)(i+1);
29         }
30 }
This page took 0.147406 seconds and 5 git commands to generate.