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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.mike/] [dyncast3.C] - Diff between revs 305 and 338

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

Rev 305 Rev 338
// { dg-do run { xfail sparc64-*-elf arm-*-pe**-* } }
// { dg-do run { xfail sparc64-*-elf arm-*-pe**-* } }
// { dg-options "-fexceptions -w" }
// { dg-options "-fexceptions -w" }
// Ensure that the return type of dynamic_cast is the real type.
// Ensure that the return type of dynamic_cast is the real type.
struct B {
struct B {
  virtual int f() { }
  virtual int f() { }
};
};
struct D : public B {
struct D : public B {
  virtual int f() { }
  virtual int f() { }
  int i;
  int i;
} od;
} od;
main() {
main() {
  B *b=&od;
  B *b=&od;
  if (dynamic_cast(b)->i)
  if (dynamic_cast(b)->i)
    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.