Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gfortran.dg/bind_c_usage_24_c.c @ 128:fe568345ddd5
fix CbC-example
author | mir3636 |
---|---|
date | Wed, 11 Apr 2018 19:32:28 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* Compiled and linked by bind_c.f90. */ #include <stdlib.h> #include <stdbool.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 (); }