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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.c-torture/] [execute/] [20050119-2.c] - Blame information for rev 154

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

Line No. Rev Author Line
1 149 jeremybenn
/* PR middle-end/19874 */
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
E
15
foo (struct S *s)
16
{
17
  if (s->a != s->b)
18
    abort ();
19
  if (s->c != C)
20
    abort ();
21
  return s->d;
22
}
23
 
24
int
25
main (void)
26
{
27
  struct S s[2];
28
  s[0].a = B;
29
  s[0].b = B;
30
  s[0].c = C;
31
  s[0].d = D;
32
  s[1].a = D;
33
  s[1].b = C;
34
  s[1].c = B;
35
  s[1].d = A;
36
  if (foo (s) != D)
37
    abort ();
38
  exit (0);
39
}
40
 

powered by: WebSVN 2.1.0

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