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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [torture/] [pr44492.C] - Blame information for rev 701

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

Line No. Rev Author Line
1 693 jeremybenn
// PR middle-end/44492
2
// { dg-do run }
3
 
4
struct T { unsigned long p; };
5
struct S { T a, b, c; unsigned d; };
6
 
7
__attribute__((noinline))
8
void
9
bar (const T &x, const T &y)
10
{
11
  if (x.p != 0x2348 || y.p != 0x2346)
12
    __builtin_abort ();
13
}
14
 
15
__attribute__((noinline))
16
void
17
foo (S &s, T e)
18
{
19
  unsigned long a = e.p;
20
  unsigned long b = s.b.p;
21
  __asm__ volatile ("" : : "rm" (a), "rm" (b));
22
  bar (e, s.b);
23
}
24
 
25
int
26
main ()
27
{
28
  S s = { { 0x2345 }, { 0x2346 }, { 0x2347 }, 6 };
29
  T t = { 0x2348 };
30
  foo (s, t);
31
}

powered by: WebSVN 2.1.0

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