diff options
Diffstat (limited to 'gcc/testsuite/obj-c++.dg/naming-3.mm')
-rw-r--r-- | gcc/testsuite/obj-c++.dg/naming-3.mm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/obj-c++.dg/naming-3.mm b/gcc/testsuite/obj-c++.dg/naming-3.mm new file mode 100644 index 00000000000..ac812678e74 --- /dev/null +++ b/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-error "conflicts" } */ + char x; +} /* { dg-error "declaration" } */ +@end + +@interface B : A +{ + char y; +} +@end |