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

Details | Compare with Previous | View Log

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

powered by: WebSVN 2.1.0

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