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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [objc.dg/] [method-10.m] - Blame information for rev 324

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

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

powered by: WebSVN 2.1.0

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