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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [obj-c++.dg/] [method-17.mm] - Blame information for rev 703

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 703 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
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
7
#include "../objc-obj-c++-shared/TestsuiteObject.m"
8
#include 
9
 
10
#define CHECK_IF(expr) if(!(expr)) abort()
11
 
12
static double d = 4.5920234e2;
13
 
14
@interface Foo : TestsuiteObject
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.