OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gfortran.dg/] [c_f_pointer_logical_driver.c] - Blame information for rev 694

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
/* { dg-options "-std=c99 -w" } */
2
 
3
#include <stdbool.h>
4
 
5
#define NUM_ELEMS 10
6
 
7
void test_scalar(_Bool *my_c_bool_ptr);
8
void test_array(_Bool *my_bool_array, int num_elems);
9
 
10
int main(int argc, char **argv)
11
{
12
  _Bool my_bool = true;
13
  _Bool my_bool_array[NUM_ELEMS];
14
  int i;
15
 
16
  test_scalar(&my_bool);
17
 
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;
22
 
23
  test_array(my_bool_array, NUM_ELEMS);
24
 
25
  return 0;
26
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.