OSDN Git Service

* config/sh/sh.md (*movqi_pop): New insn pattern.
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / obj-c++.dg / encode-8.mm
1 /* Test if the Objective-C @encode machinery distinguishes between
2    'BOOL *' (which should be encoded as '^c') and 'char *' (which
3    should be encoded as '*').  */
4 /* Contributed by Ziemowit Laski <zlaski@apple.com>.  */
5 /* { dg-xfail-run-if "PR27249" { *-*-* } { "-fgnu-runtime" } { "" } } */
6 /* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
7
8 #include <string.h>           
9 #include <stdlib.h>
10 #include <objc/objc.h>
11
12 int main(void) {
13   const char *BOOL_ptr = @encode(BOOL *);
14   const char *char_ptr = @encode(char *);
15   
16   if(strcmp(BOOL_ptr, "^c"))
17     abort();
18
19   if(strcmp(char_ptr, "*"))
20     abort();
21
22   return 0;
23 }