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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-old/] [gcc-4.2.2/] [gcc/] [testsuite/] [objc.dg/] [method-10.m] - Blame information for rev 853

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

Line No. Rev Author Line
1 149 jeremybenn
/* When there is only one candidate method available, make sure the
2
   compiler uses its argument/return types when constructing the
3
   message sends (so that proper C/C++ argument conversions may
4
   take place).  */
5
/* { dg-do run } */
6
 
7
#include <objc/Object.h>
8
extern void abort(void);
9
#define CHECK_IF(expr) if(!(expr)) abort()
10
 
11
static double d = 4.5920234e2;
12
 
13
@interface Foo : Object
14
-(void) brokenType: (int)x floatingPoint: (double)y;
15
@end
16
 
17
 
18
@implementation Foo
19
-(void) brokenType: (int)x floatingPoint: (double)y
20
{
21
        CHECK_IF(x == 459);
22
        CHECK_IF(y == d);
23
}
24
@end
25
 
26
int main(void)
27
{
28
        Foo *foo=[Foo new];
29
        [foo brokenType: d floatingPoint: d];
30
        return 0;
31
}
32
 

powered by: WebSVN 2.1.0

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