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] - Rev 694

Compare with Previous | Blame | View Log

/* { dg-options "-std=c99 -w" } */
 
#include <stdbool.h>
 
#define NUM_ELEMS 10
 
void test_scalar(_Bool *my_c_bool_ptr);
void test_array(_Bool *my_bool_array, int num_elems);
 
int main(int argc, char **argv)
{
  _Bool my_bool = true;
  _Bool my_bool_array[NUM_ELEMS];
  int i;
 
  test_scalar(&my_bool);
 
  for(i = 0; i < NUM_ELEMS; i+=2)
    my_bool_array[i] = true;
  for(i = 1; i < NUM_ELEMS; i+=2)
    my_bool_array[i] = false;
 
  test_array(my_bool_array, NUM_ELEMS);
 
  return 0;
}
 

Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

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