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++.other/] [lookup18.C] - Rev 822

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

// { dg-do assemble  }
// Test that referring to an ambiguous base in name lookup prevents
// access to the field, even though the field is not ambiguous.


struct A {
  int i;
};
struct B: virtual A { };
struct C: public B { };
struct D: public B { };
struct E: public C, public D {
  void f ();
};

void E::f() {
  B::i = 0;                     // { dg-error "" } B is ambiguous
}

void f () {
  E e;
  e.B::i = 0;                   // { dg-error "" } B is ambiguous
}

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.