aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg
diff options
context:
space:
mode:
authorAndrew Pinski <pinskia@gmail.com>2007-01-23 22:01:09 -0800
committerAndrew Pinski <pinskia@gcc.gnu.org>2007-01-23 22:01:09 -0800
commit7122aa3b32c2e6d4c0de1565586b1f3735b6b9f4 (patch)
tree39528db4f5de464d841c5b4831ead39423ff38f6 /gcc/testsuite/objc.dg
parenta5abc980c2ec7708e5e8342e0caedb19b05b2ac1 (diff)
downloadgcc-7122aa3b32c2e6d4c0de1565586b1f3735b6b9f4.zip
gcc-7122aa3b32c2e6d4c0de1565586b1f3735b6b9f4.tar.gz
gcc-7122aa3b32c2e6d4c0de1565586b1f3735b6b9f4.tar.bz2
re PR objc/27438 ([unit-at-a-time] '_OBJC_INSTANCE_0' defined but not used warning)
2007-01-23 Andrew Pinski <pinskia@gmail.com> PR objc/27438 * objc-act.c (objc_add_static_instance): Mark the decl as TREE_USED. 2007-01-23 Andrew Pinski <pinskia@gmail.com> PR objc/27438 * objc.dg/const-str-12.m: New test. From-SVN: r121102
Diffstat (limited to 'gcc/testsuite/objc.dg')
-rw-r--r--gcc/testsuite/objc.dg/const-str-12.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/objc.dg/const-str-12.m b/gcc/testsuite/objc.dg/const-str-12.m
new file mode 100644
index 0000000..95a6bef
--- /dev/null
+++ b/gcc/testsuite/objc.dg/const-str-12.m
@@ -0,0 +1,15 @@
+/* { dg-options "-Wall -funit-at-a-time -fgnu-runtime" } */
+/* { dg-do compile } */
+/* PR objc/27438, make sure that the decl produced by the front-end
+ does not cause a warning to be produced. */
+
+@interface NXConstantString
+{
+ void *isa;
+ const char * const nxcsptr;
+ const unsigned int nxcslen;
+}
+@end
+NXConstantString *a = @"NSInconsistentArchiveException"; /* { dg-bogus "defined but not used" } */
+
+