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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-stable/] [gcc-4.5.1/] [gcc/] [testsuite/] [gcc.dg/] [20021006-1.c] - Rev 826

Compare with Previous | Blame | View Log

/* PR target/7559
   This testcase was miscompiled on x86-64 due to wrong access to the struct
   members.  */
 
extern void abort();
 
struct A {
  long x;
};
 
struct R {
  struct A a, b;
};
 
struct R R = {
  {100}, {200}
};
 
void f(struct R r) {
  if (r.a.x != R.a.x || r.b.x != R.b.x)
    abort();
}
 
int main() {
  f(R);
  return 0;
}
 

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.