From: Andrew Pinski Date: Sun, 14 Aug 2005 01:33:13 +0000 (+0000) Subject: nested-func-1.m: Move to ... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=65045c09038446c48783fe7e30134d72c131a0b1;p=gcc.git nested-func-1.m: Move to ... 2005-08-13 Andrew Pinski * objc.dg/nested-func-1.m: Move to ... * objc/execute/nested-func-1.m: Here. From-SVN: r103072 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c5f9d51276d..5169ef64fde 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2005-08-13 Andrew Pinski + + * objc.dg/nested-func-1.m: Move to ... + * objc/execute/nested-func-1.m: Here. + 2005-08-13 Andrew Pinski * lib/objc.exp (objc_target_compile): Check for -fgnu-runtime diff --git a/gcc/testsuite/objc.dg/nested-func-1.m b/gcc/testsuite/objc.dg/nested-func-1.m deleted file mode 100644 index 8ec3f722c11..00000000000 --- a/gcc/testsuite/objc.dg/nested-func-1.m +++ /dev/null @@ -1,38 +0,0 @@ -/* Test basic nested C function functionality within ObjC - methods. */ -/* Contributed by Ziemowit Laski . */ -/* { dg-options "-lobjc" } */ -/* { dg-do run } */ -#include -#include -#include -#include - -int bappy (int (*blargh) (int a, int b, int c)) -{ - return blargh (4, 7, 2) + 3; -} - -@interface Foo: Object -+ (int)foo; -@end - -@implementation Foo -+ (int)foo -{ - int blargh (int a, int b, int c) - { - return a * b + c; - } - return bappy (blargh); -} -@end - -int main () -{ - int f = [Foo foo]; - if (f != 33) - abort (); - - return 0; -} diff --git a/gcc/testsuite/objc/execute/nested-func-1.m b/gcc/testsuite/objc/execute/nested-func-1.m new file mode 100644 index 00000000000..c7dd535a3c8 --- /dev/null +++ b/gcc/testsuite/objc/execute/nested-func-1.m @@ -0,0 +1,36 @@ +/* Test basic nested C function functionality within ObjC + methods. */ +/* Contributed by Ziemowit Laski . */ +#include +#include +#include +#include + +int bappy (int (*blargh) (int a, int b, int c)) +{ + return blargh (4, 7, 2) + 3; +} + +@interface Foo: Object ++ (int)foo; +@end + +@implementation Foo ++ (int)foo +{ + int blargh (int a, int b, int c) + { + return a * b + c; + } + return bappy (blargh); +} +@end + +int main () +{ + int f = [Foo foo]; + if (f != 33) + abort (); + + return 0; +}