aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc
diff options
context:
space:
mode:
authorMartin Liska <mliska@suse.cz>2016-09-29 14:58:28 +0200
committerMartin Liska <marxin@gcc.gnu.org>2016-09-29 12:58:28 +0000
commitfa0a064ae8968d49a838d6b4272ea79c547a721b (patch)
tree9ba997f65aeabcf0f9e449331121b3df54331cc3 /gcc/testsuite/objc
parent0ce1ecc7be817f0f96354b26f0d80f5bf53df764 (diff)
downloadgcc-fa0a064ae8968d49a838d6b4272ea79c547a721b.zip
gcc-fa0a064ae8968d49a838d6b4272ea79c547a721b.tar.gz
gcc-fa0a064ae8968d49a838d6b4272ea79c547a721b.tar.bz2
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
Diffstat (limited to 'gcc/testsuite/objc')
-rw-r--r--gcc/testsuite/objc/execute/construct1.m11
1 files changed, 11 insertions, 0 deletions
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;
+}