Remove old autovect-branch by moving to "dead" directory.
[official-gcc.git] / old-autovect-branch / gcc / testsuite / objc.dg / method-10.m
blob5a2a1db34629381749e4b6197324b5abfdc5359e
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 } */
7 #include <objc/Object.h>
8 extern void abort(void);
9 #define CHECK_IF(expr) if(!(expr)) abort()
11 static double d = 4.5920234e2;
13 @interface Foo : Object
14 -(void) brokenType: (int)x floatingPoint: (double)y;
15 @end
18 @implementation Foo
19 -(void) brokenType: (int)x floatingPoint: (double)y
21         CHECK_IF(x == 459);
22         CHECK_IF(y == d);
24 @end
26 int main(void)
28         Foo *foo=[Foo new];
29         [foo brokenType: d floatingPoint: d];
30         return 0;