From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001 From: upstream source tree Date: Sun, 15 Mar 2015 20:14:05 -0400 Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository. --- gcc/testsuite/objc.dg/method-conflict-3.m | 63 +++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 gcc/testsuite/objc.dg/method-conflict-3.m (limited to 'gcc/testsuite/objc.dg/method-conflict-3.m') diff --git a/gcc/testsuite/objc.dg/method-conflict-3.m b/gcc/testsuite/objc.dg/method-conflict-3.m new file mode 100644 index 000000000..cc4d2631f --- /dev/null +++ b/gcc/testsuite/objc.dg/method-conflict-3.m @@ -0,0 +1,63 @@ +/* Contributed by Nicola Pero , December 2010. */ +/* { dg-do compile } */ + +#include + +/* Test that the compiler can correctly compare protocols in types of + method signatures. */ + +@protocol A, B, C; + +@interface MyClass +- (void) method1: (id)x; +- (void) method1: (id)x; /* Ok */ + +- (void) method2: (id )x; +- (void) method2: (id )x; /* Ok */ + +- (void) method3: (id )x; +- (void) method3: (id )x; /* Ok */ + +- (void) method4: (id )x; +- (void) method4: (id )x; /* Ok */ + +- (void) method5: (id )x; +- (void) method5: (id )x; /* Ok */ + +- (void) method6: (id )x; +- (void) method6: (id )x; /* Ok */ + +- (void) method7: (id)x; /* { dg-message "previous declaration" } */ +- (void) method7: (id )x; /* { dg-error "duplicate declaration" } */ + +- (void) method8: (id )x; /* { dg-message "previous declaration" } */ +- (void) method8: (id)x; /* { dg-error "duplicate declaration" } */ + +- (void) method9: (id )x; /* { dg-message "previous declaration" } */ +- (void) method9: (id )x; /* { dg-error "duplicate declaration" } */ + +- (void) methodA: (id )x; /* { dg-message "previous declaration" } */ +- (void) methodA: (id )x; /* { dg-error "duplicate declaration" } */ + +- (void) methodB: (id )x; /* { dg-message "previous declaration" } */ +- (void) methodB: (id )x; /* { dg-error "duplicate declaration" } */ + +- (void) methodC: (id )x; /* { dg-message "previous declaration" } */ +- (void) methodC: (id )x; /* { dg-error "duplicate declaration" } */ + +- (void) methodD: (id )x; /* { dg-message "previous declaration" } */ +- (void) methodD: (id )x; /* { dg-error "duplicate declaration" } */ + +- (void) methodE: (MyClass *)x; /* { dg-message "previous declaration" } */ +- (void) methodE: (MyClass *)x; /* { dg-error "duplicate declaration" } */ + +- (void) methodF: (MyClass *)x; +- (void) methodF: (MyClass *)x; /* Ok */ + +- (void) methodG: (MyClass *)x; /* { dg-message "previous declaration" } */ +- (void) methodG: (MyClass *)x; /* { dg-error "duplicate declaration" } */ + +- (void) methodH: (MyClass *)x; /* { dg-message "previous declaration" } */ +- (void) methodH: (MyClass *)x; /* { dg-error "duplicate declaration" } */ + +@end -- cgit v1.2.3