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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 694 jeremybenn
typedef struct c_type_0
2
{
3
  int i;
4
  int *ptr;
5
  int array[3];
6
}c_type_0_t;
7
 
8
typedef struct c_type_1
9
{
10
  c_type_0_t nested_type;
11
  int *ptr;
12
  int j;
13
}c_type_1_t;
14
 
15
void sub0(c_type_1_t *c_type, int expected_i, int *expected_nested_ptr,
16
          int array_0, int array_1, int array_2,
17
          int *expected_ptr, int expected_j);
18
 
19
int main(int argc, char **argv)
20
{
21
  c_type_1_t c_type;
22
 
23
  c_type.nested_type.i = 10;
24
  c_type.nested_type.ptr = &(c_type.nested_type.i);
25
  c_type.nested_type.array[0] = 1;
26
  c_type.nested_type.array[1] = 2;
27
  c_type.nested_type.array[2] = 3;
28
  c_type.ptr = &(c_type.j);
29
  c_type.j = 11;
30
 
31
  sub0(&c_type, c_type.nested_type.i, c_type.nested_type.ptr,
32
       c_type.nested_type.array[0],
33
       c_type.nested_type.array[1], c_type.nested_type.array[2],
34
       c_type.ptr, c_type.j);
35
 
36
  return 0;
37
}

powered by: WebSVN 2.1.0

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