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] - Rev 749

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

// PR middle-end/44492
// { dg-do run }

struct T { unsigned long p; };
struct S { T a, b, c; unsigned d; };

__attribute__((noinline))
void
bar (const T &x, const T &y)
{
  if (x.p != 0x2348 || y.p != 0x2346)
    __builtin_abort ();
}

__attribute__((noinline))
void
foo (S &s, T e)
{
  unsigned long a = e.p;
  unsigned long b = s.b.p;
  __asm__ volatile ("" : : "rm" (a), "rm" (b));
  bar (e, s.b);
}

int
main ()
{
  S s = { { 0x2345 }, { 0x2346 }, { 0x2347 }, 6 };
  T t = { 0x2348 };
  foo (s, t);
}

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

powered by: WebSVN 2.1.0

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