URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
// Test that the typeid name for a local class is properly null-terminated.
|
// Test that the typeid name for a local class is properly null-terminated.
|
// { dg-do run }
|
// { dg-do run }
|
|
|
#include
|
#include
|
#include
|
#include
|
#include
|
#include
|
|
|
int f()
|
int f()
|
{
|
{
|
struct A {}; struct B {};
|
struct A {}; struct B {};
|
const std::type_info &ti = typeid(A);
|
const std::type_info &ti = typeid(A);
|
const std::type_info &ti2 = typeid(B);
|
const std::type_info &ti2 = typeid(B);
|
puts (ti.name());
|
puts (ti.name());
|
puts (ti2.name());
|
puts (ti2.name());
|
return strcmp (ti.name(), "Z1fvE1A") || strcmp (ti2.name(), "Z1fvE1B");
|
return strcmp (ti.name(), "Z1fvE1A") || strcmp (ti2.name(), "Z1fvE1B");
|
}
|
}
|
|
|
int main()
|
int main()
|
{
|
{
|
return f();
|
return f();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.