Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / objc.dg / method-10.m
blob311fc3b910e786f7f227f0b02d456bb96bc63ce3
1 /* 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" } { "" } } */
8 #include "../objc-obj-c++-shared/TestsuiteObject.m"
10 extern void abort(void);
11 #define CHECK_IF(expr) if(!(expr)) abort()
13 static double d = 4.5920234e2;
15 @interface Foo : TestsuiteObject
16 -(void) brokenType: (int)x floatingPoint: (double)y;
17 @end
20 @implementation Foo
21 -(void) brokenType: (int)x floatingPoint: (double)y
23         CHECK_IF(x == 459);
24         CHECK_IF(y == d);
26 @end
28 int main(void)
30         Foo *foo=[Foo new];
31         [foo brokenType: d floatingPoint: d];
32         return 0;