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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [objc.dg/] [selector-4.m] - Blame information for rev 801

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 704 jeremybenn
/* Test whether including C++ keywords such as 'and', 'or',
2
   'not', etc., is allowed inside ObjC selectors (as it must be).  */
3
/* Author: Ziemowit Laski <zlaski@apple.com>.  */
4
 
5
/* { dg-do compile } */
6
 
7
@interface Int1
8
+ (int)and_eq:(int)arg1 and:(int)arg2;
9
- (int)or_eq:(int)arg1 or:(int)arg3;
10
- (int)not:(int)arg1 xor:(int)arg2;
11
- (void)bitand:(char)c1 bitor:(char)c2;
12
- (void)compl:(float)f1 xor_eq:(double)d1;
13
- (void)not_eq;
14
@end
15
 
16
@implementation Int1
17
+ (int)and_eq:(int)arg1 and:(int)arg2 { return arg1 + arg2; }
18
- (int)or_eq:(int)arg1 or:(int)arg3 { return arg1 + arg3; }
19
- (int)not:(int)arg1 xor:(int)arg2 { return arg1 + arg2; }
20
- (void)bitand:(char)c1 bitor:(char)c2 { }
21
- (void)compl:(float)f1 xor_eq:(double)d1 { }
22
- (void)not_eq { }
23
@end
24
 
25
/* { dg-final { scan-assembler  "\\+\\\[Int1 and_eq:and:\\]|c_Int1__and_eq_and" } } */
26
/* { dg-final { scan-assembler  "\\-\\\[Int1 or_eq:or:\\]|i_Int1__or_eq_or" } } */
27
/* { dg-final { scan-assembler  "\\-\\\[Int1 not:xor:\\]|i_Int1__not_xor" } } */
28
/* { dg-final { scan-assembler  "\\-\\\[Int1 bitand:bitor:\\]|i_Int1__bitand_bitor" } } */
29
/* { dg-final { scan-assembler  "\\-\\\[Int1 compl:xor_eq:\\]|i_Int1__compl_xor_eq" } } */
30
/* { dg-final { scan-assembler  "\\-\\\[Int1 not_eq\\]|i_Int1__not_eq" } } */

powered by: WebSVN 2.1.0

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