2014-07-12 Paul Thomas <pault@gcc.gnu.org>
[official-gcc.git] / gcc / testsuite / gfortran.dg / bind_c_usage_24_c.c
blob65754f3415d7ba3a43afc17fcd565375969e31c7
1 /* Compiled and linked by bind_c.f90. */
3 #include <stdlib.h>
4 #include <stdbool.h>
6 void subtest (bool, int *);
8 void
9 c_proc (bool present, int *val)
11 int val2;
12 if (!present && val)
13 abort ();
14 else if (present)
16 if (!val) abort ();
17 if (*val != 4) abort ();
18 *val = 7;
21 val2 = 43;
22 subtest (1, &val2);
23 subtest (0, NULL);
24 if (val2 != -45) abort ();