(root)/
gcc-13.2.0/
gcc/
testsuite/
gfortran.dg/
bind_c_usage_24_c.c
       1  /* Compiled and linked by bind_c.f90.  */
       2  
       3  #include <stdlib.h>
       4  #include <stdbool.h>
       5  
       6  void subtest (bool, int *);
       7  
       8  void
       9  c_proc (bool present, int *val)
      10  {
      11    int val2;
      12    if (!present && val)
      13      abort ();
      14    else if (present)
      15      {
      16        if (!val) abort ();
      17        if (*val != 4) abort ();
      18        *val = 7;
      19      }
      20  
      21    val2 = 43;
      22    subtest (1, &val2);
      23    subtest (0, NULL);
      24    if (val2 != -45) abort ();
      25  }