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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.jason/] [anon.C] - Diff between revs 149 and 154

Only display areas with differences | Details | Blame | View Log

Rev 149 Rev 154
// { dg-do run  }
// { dg-do run  }
// Bug: g++ has trouble copying anonymous structs.
// Bug: g++ has trouble copying anonymous structs.
typedef struct { int i; } foo;
typedef struct { int i; } foo;
struct A : public foo {
struct A : public foo {
  struct { int i; } x;
  struct { int i; } x;
};
};
int main ()
int main ()
{
{
  A a;
  A a;
  a.i = 5;
  a.i = 5;
  a.x.i = 42;
  a.x.i = 42;
  A b (a);
  A b (a);
  a = b;
  a = b;
  if (a.i != 5 || a.x.i != 42)
  if (a.i != 5 || a.x.i != 42)
    return 1;
    return 1;
  return 0;
  return 0;
}
}
 
 

powered by: WebSVN 2.1.0

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