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

Subversion Repositories openrisc

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

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 jeremybenn
/* Test demangling an Objective-C method.  */
2
/* { dg-do run } */
3
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
4
 
5
#include 
6
#include 
7
#include 
8
#include 
9
 
10
@interface DemangleTest
11
{
12
  Class isa;
13
}
14
+ (int) testFunction1;
15
+ (int) test_function2;
16
+ (int) __testFunction3: (int)unused  andArgument: (char)unused2;
17
+ (id) initialize;
18
@end
19
 
20
@implementation DemangleTest
21
+ (int) testFunction1
22
{
23
  std::cout << __PRETTY_FUNCTION__ << "\n";
24
  return std::strcmp (__PRETTY_FUNCTION__, "+[DemangleTest testFunction1]");
25
}
26
+ (int) test_function2
27
{
28
  std::cout << __PRETTY_FUNCTION__ << "\n";
29
  return std::strcmp (__PRETTY_FUNCTION__, "+[DemangleTest test_function2]");
30
}
31
+ (int) __testFunction3: (int)unused   andArgument: (char)unused2
32
{
33
  std::cout << __PRETTY_FUNCTION__ << "\n";
34
  return std::strcmp (__PRETTY_FUNCTION__, "+[DemangleTest __testFunction3:andArgument:]");
35
}
36
+ (id) initialize { return self; }
37
@end
38
 
39
int main ()
40
{
41
  if ([DemangleTest testFunction1] != 0)
42
      abort ();
43
 
44
  if ([DemangleTest test_function2] != 0)
45
      abort ();
46
 
47
  if ([DemangleTest __testFunction3:0 andArgument: 'c'] != 0)
48
      abort ();
49
 
50
  return 0;
51
}
52
 
53
 

powered by: WebSVN 2.1.0

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