summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gfortran.dg/bind_c_usage_16_c.c
blob: 30ce25f8bd7ac3cf654f357db8b9de626e5a8645 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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;
}