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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.dg/] [20040305-2.c] - Rev 867

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

/* PR target/14262 */
/* { dg-do run } */
 
extern void abort (void);
 
typedef char   ACS;
typedef char   LSM;
typedef char   PANEL;
typedef char   DRIVE;
typedef struct {
    ACS             acs;
    LSM             lsm;
} LSMID;
typedef struct {
    LSMID           lsm_id;
    PANEL           panel;
} PANELID;
typedef struct {
    PANELID         panel_id;
    DRIVE           drive;
} DRIVEID;
 
void sub (DRIVEID driveid)
{
  if (driveid.drive != 1)
    abort ();
  if (driveid.panel_id.panel != 2)
    abort ();
  if (driveid.panel_id.lsm_id.lsm != 3)
    abort ();
  if (driveid.panel_id.lsm_id.acs != 4)
    abort ();
}
 
int main(void)
{
  DRIVEID driveid;
 
  driveid.drive = 1;
  driveid.panel_id.panel = 2;
  driveid.panel_id.lsm_id.lsm = 3;
  driveid.panel_id.lsm_id.acs = 4;
 
  sub(driveid);
 
  return 0;
}
 
 
 

Go to most recent revision | 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.