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.target/] [i386/] [pr25654.c] - Blame information for rev 378

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

Line No. Rev Author Line
1 318 jeremybenn
/* { dg-do run } */
2
/* { dg-require-effective-target ilp32 } */
3
/* { dg-options "-O2 -mpreferred-stack-boundary=2 -march=i686 -frename-registers" } */
4
 
5
extern void abort (void) __attribute__((noreturn));
6
 
7
struct wrapper {
8
union setconflict
9
{
10
  short a[20];
11
  int b[10];
12
} a;
13
};
14
 
15
int
16
main ()
17
{
18
  int sum = 0;
19
  {
20
    struct wrapper a;
21
    short *c;
22
    c = a.a.a;
23
    asm ("": "=r" (c):"0" (c));
24
    *c = 0;
25
    asm ("": "=r" (c):"0" (c));
26
    sum += *c;
27
  }
28
  {
29
    struct wrapper a;
30
    int *c;
31
    c = a.a.b;
32
    asm ("": "=r" (c):"0" (c));
33
    *c = 1;
34
    asm ("": "=r" (c):"0" (c));
35
    sum += *c;
36
  }
37
 
38
  if (sum != 1)
39
    abort();
40
  return 0;
41
}
42
 

powered by: WebSVN 2.1.0

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