fix pr/45972
[official-gcc.git] / gcc / testsuite / gfortran.dg / c_f_pointer_logical_driver.c
blobe3044c92e436e11ef9c6599b2780ca5d849f27c1
1 /* { dg-options "-std=c99 -w" } */
3 #include <stdbool.h>
5 #define NUM_ELEMS 10
7 void test_scalar(_Bool *my_c_bool_ptr);
8 void test_array(_Bool *my_bool_array, int num_elems);
10 int main(int argc, char **argv)
12 _Bool my_bool = true;
13 _Bool my_bool_array[NUM_ELEMS];
14 int i;
16 test_scalar(&my_bool);
18 for(i = 0; i < NUM_ELEMS; i+=2)
19 my_bool_array[i] = true;
20 for(i = 1; i < NUM_ELEMS; i+=2)
21 my_bool_array[i] = false;
23 test_array(my_bool_array, NUM_ELEMS);
25 return 0;