aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gfortran.dg/bind_c_usage_24_c.c
blob: ffc90b728b5e1f1f241da8f20ba397d87d35ceda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/* Compiled and linked by bind_c.f90.  */

#include <stdlib.h>

void subtest (_Bool, int *);

void
c_proc (_Bool present, int *val)
{
  int val2;
  if (!present && val)
    abort ();
  else if (present)
    {
      if (!val) abort ();
      if (*val != 4) abort ();
      *val = 7;
    }

  val2 = 43;
  subtest (1, &val2);
  subtest (0, NULL);
  if (val2 != -45) abort ();
}