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++.dg/] [rtti/] [typeid9.C] - Diff between revs 301 and 338

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();
}
}
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.