+2003-10-13 Ziemowit Laski <zlaski@apple.com>
+
+ * objc/execute/_cmd.m: Fix typo.
+ * objc.dg/image-info.m, objc.dg/symtab-1.m:
+ Relax 'scan-assembler' regexp.
+ * objc.dg/try-catch-1.m, objc.dg/try-catch-3.m,
+ objc.dg/try-catch-4.m: Run on non-Darwin targets.
+ * objc.dg/zero-link-2.m: Remove blank line.
+ * objc.dg/zero-link-3.m: New test case.
+
2003-10-13 Geoffrey Keating <geoffk@apple.com>
* g77.f-torture/execute/980520-1.x: XFAIL at -O0.
}
@end
-/* { dg-final { scan-assembler "\n.data\n.section __OBJC, __image_info\n\t.align.*\nL_OBJC_IMAGE_INFO:\n\t.long\t0\n\t.long\t1\n.data\n.objc_module_info\n" } } */
+/* { dg-final { scan-assembler "\n.data\n.section __OBJC, __image_info\n\t.align.*\nL_OBJC_IMAGE_INFO.*:\n\t.long\t0\n\t.long\t1\n.data\n.objc_module_info\n" } } */
-(void)checkValues { }
@end
-/* { dg-final { scan-assembler "L_OBJC_SYMBOLS:\n\t.long\t0\n\t.long\t0\n\t.short\t2\n\t.short\t0\n\t.long\tL_OBJC_CLASS_Derived\n\t.long\tL_OBJC_CLASS_Base\n" } } */
+/* { dg-final { scan-assembler "L_OBJC_SYMBOLS.*:\n\t.long\t0\n\t.long\t0\n\t.short\t2\n\t.short\t0\n\t.long\tL_OBJC_CLASS_Derived.*\n\t.long\tL_OBJC_CLASS_Base.*\n" } } */
/* Test if the compiler accepts @throw / @try..@catch..@finally
- syntax. This will only be usable on MacOS X 10.3 and later. */
+ syntax. This will only be usable on MacOS X 10.3 and later,
+ but may be compiled on all targets. */
/* Developed by Ziemowit Laski <zlaski@apple.com>. */
-/* { dg-options "-fobjc-exceptions" } */
-/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-options "-fnext-runtime -fobjc-exceptions" } */
+/* { dg-do compile } */
-#include <objc/objc.h>
-#include <objc/objc-runtime.h>
#include <objc/Object.h>
#include <stdio.h>
#include <setjmp.h>
@catch block. (Yes, I managed to break this.) */
/* Author: Ziemowit Laski <zlaski@apple.com> */
-/* { dg-do compile { target *-*-darwin* } } */
-/* { dg-options "-fobjc-exceptions" } */
+/* { dg-do compile } */
+/* { dg-options "-fnext-runtime -fobjc-exceptions" } */
#include <objc/Object.h>
exceptions being caught by previous @catch blocks. */
/* Author: Ziemowit Laski <zlaski@apple.com> */
-/* { dg-do compile { target *-*-darwin* } } */
-/* { dg-options "-Wall -fobjc-exceptions" } */
+/* { dg-do compile } */
+/* { dg-options "-Wall -fnext-runtime -fobjc-exceptions" } */
@interface Exception
@end
/* { dg-final { scan-assembler "_OBJC_CLASS_REFERENCES_0" } } */
/* { dg-final { scan-assembler-not "objc_getClass" } } */
-
--- /dev/null
+/* Check that the '-fzero-link' flag doesn't prevent messaging from working. */
+/* Contributed by Ziemowit Laski <zlaski@apple.com>. */
+/* { dg-options "-fnext-runtime -fzero-link -lobjc" } */
+/* { dg-do run { target *-*-darwin* } } */
+
+#import <objc/objc.h>
+#import <objc/Object.h>
+
+extern void abort(void);
+#define CHECK_IF(expr) if(!(expr)) abort();
+
+@interface Base: Object
++ (int) getValue;
+@end
+
+@implementation Base
++ (int) getValue { return 1593; }
+@end
+
+int main(void) {
+ int val = [Base getValue];
+ CHECK_IF(val == 1593);
+ return 0;
+}
@end
@implementation TestClass
-+ (const char*) method;
++ (const char*) method
{
return sel_get_name (_cmd);
}