* tree-loop-distribution.c (struct partition): New field recording
[official-gcc.git] / gcc / testsuite / obj-c++.dg / demangle-1.mm
blob015a3aff848154c64f5ec0fc1fa4c98cc7806f3f
1 /* Test demangling a C++ function.  */
2 /* { dg-do run } */
4 #include <cstring>
5 #include <cstdlib>
6 #include <iostream>
8 class demangle_test
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   }
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   }
26 int main ()
28   if (demangle_test::test_function1 () != 0)
29     abort ();
31   if (demangle_test::test_function2 (0) != 0)
32     abort ();
33   
34   return 0;