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.c-torture/] [execute/] [20050119-1.c] - Blame information for rev 307

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

Line No. Rev Author Line
1 297 jeremybenn
/* PR c/19342 */
2
typedef enum { A, B, C, D } E;
3
 
4
struct S {
5
  E __attribute__ ((mode (__byte__))) a;
6
  E __attribute__ ((mode (__byte__))) b;
7
  E __attribute__ ((mode (__byte__))) c;
8
  E __attribute__ ((mode (__byte__))) d;
9
};
10
 
11
extern void abort (void);
12
extern void exit (int);
13
 
14
void
15
foo (struct S *s)
16
{
17
  if (s->a != s->b)
18
    abort ();
19
  if (s->c != C)
20
    abort ();
21
}
22
 
23
int
24
main (void)
25
{
26
  struct S s[2];
27
  s[0].a = B;
28
  s[0].b = B;
29
  s[0].c = C;
30
  s[0].d = D;
31
  s[1].a = D;
32
  s[1].b = C;
33
  s[1].c = B;
34
  s[1].d = A;
35
  foo (s);
36
  exit (0);
37
}

powered by: WebSVN 2.1.0

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