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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gcc.dg/] [torture/] [pr25654.c] - Blame information for rev 754

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

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

powered by: WebSVN 2.1.0

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