From fa0a064ae8968d49a838d6b4272ea79c547a721b Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Thu, 29 Sep 2016 14:58:28 +0200 Subject: objc: update documetation and add test-case of * doc/extend.texi: Remove limitation of Objective C for __attribute__((constructor)) and __attribute__((destructor)). * objc/execute/construct1.m: New test. From-SVN: r240618 --- gcc/testsuite/objc/execute/construct1.m | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 gcc/testsuite/objc/execute/construct1.m (limited to 'gcc/testsuite/objc') diff --git a/gcc/testsuite/objc/execute/construct1.m b/gcc/testsuite/objc/execute/construct1.m new file mode 100644 index 0000000..3de036d --- /dev/null +++ b/gcc/testsuite/objc/execute/construct1.m @@ -0,0 +1,11 @@ +int i; + +void hello (void) __attribute__ ((constructor)); +void hello (void) { i = 1; } + +int main (void) { + if (i != 1) + return 1; + + return 0; +} -- cgit v1.1