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] - Blame information for rev 301

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

Line No. Rev Author Line
1 301 jeremybenn
// Test that the typeid name for a local class is properly null-terminated.
2
// { dg-do run }
3
 
4
#include 
5
#include 
6
#include 
7
 
8
int f()
9
{
10
  struct A {}; struct B {};
11
  const std::type_info &ti = typeid(A);
12
  const std::type_info &ti2 = typeid(B);
13
  puts (ti.name());
14
  puts (ti2.name());
15
  return strcmp (ti.name(), "Z1fvE1A") || strcmp (ti2.name(), "Z1fvE1B");
16
}
17
 
18
int main()
19
{
20
  return f();
21
}

powered by: WebSVN 2.1.0

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