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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [gcc.target/] [i386/] [pr25293.c] - Blame information for rev 867

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

Line No. Rev Author Line
1 149 jeremybenn
/* PR target/25293 */
2
/* { dg-do compile } */
3
/* { dg-options "-mpreferred-stack-boundary=2 -mtune=i586 -O2 -fomit-frame-pointer -g" } */
4
/* { dg-require-effective-target ilp32 } */
5
 
6
struct T { unsigned short t1, t2, t3, t4, t5, t6, t7; };
7
struct S { struct T s1; unsigned short s2, s3; };
8
unsigned short v1;
9
int f1 (void);
10
int f2 (struct T);
11
int f3 (const char *);
12
 
13
int
14
foo (struct S *x, struct T y)
15
{
16
  unsigned short a, b, c;
17
  unsigned long d, e;
18
  int f = 0;
19
  y.t6 = 6;
20
  a = y.t7;
21
  b = y.t6;
22
  c = y.t7;
23
  switch (a)
24
    {
25
    case 8:
26
    case 7:
27
      c = 9;
28
      break;
29
    case 1:
30
    case 6:
31
    case 3:
32
      b = 16;
33
      c = 9;
34
      break;
35
    }
36
  if ((f = f1 ()))
37
    goto error;
38
  if ((f = f2 (y)))
39
    goto error;
40
  d = (long) &y;
41
  e = (long) &x->s1;
42
  __asm __volatile ("" : "+D" (e), "+S" (d) :: "memory");
43
  x->s2 = b;
44
  x->s3 = c;
45
  f3 ("foo");
46
  return 0;
47
error:
48
  if (v1 >= 1)
49
    f3 ("bar");
50
  return f;
51
}

powered by: WebSVN 2.1.0

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