* gcc.dg/vect/vect-shift-1.c: Include tree-vect.h header. Check
[official-gcc.git] / gcc / testsuite / obj-c++.dg / method-17.mm
blob556830f3449fe482c0ff11c1852bd29a1623023c
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 "C" 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: (int)d floatingPoint: d];
30         return 0;