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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [20040305-2.c] - Blame information for rev 328

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* PR target/14262 */
2
/* { dg-do run } */
3
 
4
extern void abort (void);
5
 
6
typedef char   ACS;
7
typedef char   LSM;
8
typedef char   PANEL;
9
typedef char   DRIVE;
10
typedef struct {
11
    ACS             acs;
12
    LSM             lsm;
13
} LSMID;
14
typedef struct {
15
    LSMID           lsm_id;
16
    PANEL           panel;
17
} PANELID;
18
typedef struct {
19
    PANELID         panel_id;
20
    DRIVE           drive;
21
} DRIVEID;
22
 
23
void sub (DRIVEID driveid)
24
{
25
  if (driveid.drive != 1)
26
    abort ();
27
  if (driveid.panel_id.panel != 2)
28
    abort ();
29
  if (driveid.panel_id.lsm_id.lsm != 3)
30
    abort ();
31
  if (driveid.panel_id.lsm_id.acs != 4)
32
    abort ();
33
}
34
 
35
int main(void)
36
{
37
  DRIVEID driveid;
38
 
39
  driveid.drive = 1;
40
  driveid.panel_id.panel = 2;
41
  driveid.panel_id.lsm_id.lsm = 3;
42
  driveid.panel_id.lsm_id.acs = 4;
43
 
44
  sub(driveid);
45
 
46
  return 0;
47
}
48
 
49
 

powered by: WebSVN 2.1.0

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