summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-24 06:01:09 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-24 06:01:09 +0000
commitda2f0f2c26ca9ddeac3c5fb917a2bf89bcf38df9 (patch)
tree39528db4f5de464d841c5b4831ead39423ff38f6 /gcc/testsuite/objc.dg
parentc50429507d9701cbdf0886566163c6477e2cece9 (diff)
downloadgcc-da2f0f2c26ca9ddeac3c5fb917a2bf89bcf38df9.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@121102 138bc75d-0d04-0410-961f-82ee72b054a4
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 00000000000..95a6bef3241
--- /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" } */
+
+