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++.dg/] [rtti/] [typeid4.C] - Rev 199
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do run }
// { dg-options "-O2" }
#include <typeinfo>
#include <iostream>
struct A { virtual ~A () {} };
struct APtr
{
APtr (A* p) : p_ (p) { }
A& operator* () const { return *p_; }
A* p_;
};
int main ()
{
APtr ap (new A);
std::type_info const* const exp = &typeid (*ap);
for (bool cont = true; cont; cont = false)
{
std::cout << "inner: cont " << cont << std::endl;
if (exp) ;
}
}
Go to most recent revision | Compare with Previous | Blame | View Log