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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [tt2.C] - Rev 816

Compare with Previous | Blame | View Log

// { dg-do assemble  }

int f1 () {
  struct A {
    A() : b (2) { }
    int fred () { return b.hi_mom; }
    struct B {
      int hi_mom;
      B (int a) { hi_mom = a; }
    };
    B b;
  };
  A aa;
  return aa.fred();
}

int f2 () {
  struct A {
    ~A() { a = 3; }
    int a;
    int fred () { return a + 1; }
  };

  A ab;
  ab.a = 12;
  return ab.fred();
}

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.