aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/obj-c++.dg/naming-3.mm
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/obj-c++.dg/naming-3.mm')
-rw-r--r--gcc-4.9/gcc/testsuite/obj-c++.dg/naming-3.mm15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/obj-c++.dg/naming-3.mm b/gcc-4.9/gcc/testsuite/obj-c++.dg/naming-3.mm
new file mode 100644
index 000000000..dda15fc68
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/obj-c++.dg/naming-3.mm
@@ -0,0 +1,15 @@
+/* Testing for detecting duplicate ivars. */
+/* { dg-do compile } */
+
+@interface A
+{
+ char x; /* { dg-message "previous declaration" } */
+ char x;
+} /* { dg-error "redeclaration" } */
+@end
+
+@interface B : A
+{
+ char y;
+}
+@end