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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [demangle-1.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Test demangling a C++ function.  */
2
/* { dg-do run } */
3
 
4
#include 
5
#include 
6
#include 
7
 
8
class demangle_test
9
{
10
public:
11
  /* Return 0 if the demangling test succeeds.  */
12
  static int test_function1 ()
13
  {
14
    std::cout << __PRETTY_FUNCTION__ << "\n";
15
    return std::strcmp (__PRETTY_FUNCTION__, "static int demangle_test::test_function1()");
16
  }
17
 
18
  /* Return 0 if the demangling test succeeds.  */
19
  static int test_function2 (int ignored)
20
  {
21
    std::cout << __PRETTY_FUNCTION__ << "\n";
22
    return std::strcmp (__PRETTY_FUNCTION__, "static int demangle_test::test_function2(int)");
23
  }
24
};
25
 
26
int main ()
27
{
28
  if (demangle_test::test_function1 () != 0)
29
    abort ();
30
 
31
  if (demangle_test::test_function2 (0) != 0)
32
    abort ();
33
 
34
  return 0;
35
}

powered by: WebSVN 2.1.0

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