diff options
Diffstat (limited to 'gcc/testsuite/gfortran.dg/bind_c_usage_16_c.c')
-rw-r--r-- | gcc/testsuite/gfortran.dg/bind_c_usage_16_c.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_16_c.c b/gcc/testsuite/gfortran.dg/bind_c_usage_16_c.c new file mode 100644 index 000000000..30ce25f8b --- /dev/null +++ b/gcc/testsuite/gfortran.dg/bind_c_usage_16_c.c @@ -0,0 +1,22 @@ +/* Check character-returning bind(C) functions + PR fortran/34079 + To be linked with bind_c_usage_16.f03 +*/ + +#include <stdlib.h> + +char returnA(char *); +char returnB(void); +void test(void); + +int main() +{ + char c; + c = 'z'; + c = returnA(&c); + if (c != 'A') abort(); + c = returnB(); + if (c != 'B') abort(); + test(); + return 0; +} |