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

Subversion Repositories scarts

[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [obj-c++.dg/] [method-17.mm] - Blame information for rev 20

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

Line No. Rev Author Line
1 12 jlechner
/* 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 
8
#include 
9
 
10
#define CHECK_IF(expr) if(!(expr)) abort()
11
 
12
static double d = 4.5920234e2;
13
 
14
@interface Foo : Object
15
-(void) brokenType: (int)x floatingPoint: (double)y;
16
@end
17
 
18
 
19
@implementation Foo
20
-(void) brokenType: (int)x floatingPoint: (double)y
21
{
22
        CHECK_IF(x == 459);
23
        CHECK_IF(y == d);
24
}
25
@end
26
 
27
int main(void)
28
{
29
        Foo *foo=[Foo new];
30
        [foo brokenType: (int)d floatingPoint: d];
31
        return 0;
32
}
33
 

powered by: WebSVN 2.1.0

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