summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/no-extra-load.mm
blob: 1663ebc2132ffeb6395487a8e6d7dab951739488 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// Radar 3926484

// { dg-do compile }

#include "../objc-obj-c++-shared/Object1.h"
#include <iostream>

@interface Greeter : Object
- (void) greet: (const char *)msg;
@end

@implementation Greeter
- (void) greet: (const char *)msg { std::cout << msg; }
@end

int
main ()
{
  std::cout << "Hello from C++\n";
  Greeter *obj = [Greeter new];
  [obj greet: "Hello from Objective-C\n"];
}

/* { dg-final { scan-assembler-not "L_objc_msgSend\\\$non_lazy_ptr" } } */