2014-04-15 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gfortran.dg / bind_c_usage_24_c.c
blobffc90b728b5e1f1f241da8f20ba397d87d35ceda
1 /* Compiled and linked by bind_c.f90. */
3 #include <stdlib.h>
5 void subtest (_Bool, int *);
7 void
8 c_proc (_Bool present, int *val)
10 int val2;
11 if (!present && val)
12 abort ();
13 else if (present)
15 if (!val) abort ();
16 if (*val != 4) abort ();
17 *val = 7;
20 val2 = 43;
21 subtest (1, &val2);
22 subtest (0, NULL);
23 if (val2 != -45) abort ();