OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr38405.c] - Blame information for rev 298

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 298 jeremybenn
/* { dg-do run } */
2
 
3
extern void abort ();
4
extern int printf (char *__format, ...);
5
 
6
struct vpiBinaryConst {
7
 int signed_flag :1;
8
 int sized_flag :1;
9
};
10
 
11
int binary_get(int code, struct vpiBinaryConst *rfp)
12
{
13
 switch (code) {
14
  case 1:
15
   return rfp->signed_flag ? 1 : 0;
16
  default:
17
   printf("error: %d not supported\n", code);
18
   return code;
19
 }
20
}
21
 
22
int main(void)
23
{
24
 struct vpiBinaryConst x={1,0};
25
 int y=binary_get(1, &x);
26
 if (y!=1)
27
   abort ();
28
 return 0;
29
}

powered by: WebSVN 2.1.0

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