OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [gcc.c-torture/] [compile/] [20020312-1.c] - Blame information for rev 338

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 297 jeremybenn
/* This does not compile on HC11/HC12 due to the asm which requires
2
   two 32-bit registers.  */
3
/* { dg-do assemble } */
4
/* { dg-xfail-if "" { m6811-*-* m6812-*-* } { "*" } { "" } } */
5
 
6
/* PR optimization/5892 */
7
typedef struct { unsigned long a; unsigned int b, c; } A;
8
typedef struct { unsigned long a; A *b; int c; } B;
9
 
10
static inline unsigned int
11
bar (unsigned int x)
12
{
13
  unsigned long r;
14
  asm ("" : "=r" (r) : "0" (x));
15
  return r >> 31;
16
}
17
 
18
int foo (B *x)
19
{
20
  A *y;
21
  y = x->b;
22
  y->b = bar (x->c);
23
  y->c = ({ unsigned int z = 1; (z << 24) | (z >> 24); });
24
}

powered by: WebSVN 2.1.0

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