Commit 430002e1 by Sandra Loosemore Committed by Sandra Loosemore

PR other/16615 [3/5]

2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>

	PR other/16615 [3/5]

	gcc/testsuite/
	* g++.dg/lto/odr-1_1.C: Update diagnostic message patterns to replace
	"can not" with "cannot".
	* gfortran.dg/common_15.f90: Likewise.
	* gfortran.dg/derived_result_2.f90: Likewise.
	* gfortran.dg/do_check_6.f90: Likewise.
	* gfortran.dg/namelist_args.f90: Likewise.
	* gfortran.dg/negative_unit_check.f90: Likewise.
	* gfortran.dg/pure_formal_3.f90: Likewise.
	* obj-c++.dg/attributes/method-attribute-2.mm: Likewise.
	* obj-c++.dg/exceptions-3.mm: Likewise.
	* obj-c++.dg/exceptions-4.mm: Likewise.
	* obj-c++.dg/exceptions-5.mm: Likewise.
	* obj-c++.dg/property/at-property-23.mm: Likewise.
	* obj-c++.dg/property/dotsyntax-17.mm: Likewise.
	* obj-c++.dg/property/property-neg-7.mm: Likewise.
	* objc.dg/attributes/method-attribute-2.m: Likewise.
	* objc.dg/exceptions-3.m: Likewise.
	* objc.dg/exceptions-4.m: Likewise.
	* objc.dg/exceptions-5.m: Likewise.
	* objc.dg/param-1.m: Likewise.
	* objc.dg/property/at-property-23.m: Likewise.
	* objc.dg/property/dotsyntax-17.m: Likewise.
	* objc.dg/property/property-neg-7.m: Likewise.

From-SVN: r267785
parent adcb167e
2019-01-09 Sandra Loosemore <sandra@codesourcery.com>
PR other/16615
* g++.dg/lto/odr-1_1.C: Update diagnostic message patterns to replace
"can not" with "cannot".
* gfortran.dg/common_15.f90: Likewise.
* gfortran.dg/derived_result_2.f90: Likewise.
* gfortran.dg/do_check_6.f90: Likewise.
* gfortran.dg/namelist_args.f90: Likewise.
* gfortran.dg/negative_unit_check.f90: Likewise.
* gfortran.dg/pure_formal_3.f90: Likewise.
* obj-c++.dg/attributes/method-attribute-2.mm: Likewise.
* obj-c++.dg/exceptions-3.mm: Likewise.
* obj-c++.dg/exceptions-4.mm: Likewise.
* obj-c++.dg/exceptions-5.mm: Likewise.
* obj-c++.dg/property/at-property-23.mm: Likewise.
* obj-c++.dg/property/dotsyntax-17.mm: Likewise.
* obj-c++.dg/property/property-neg-7.mm: Likewise.
* objc.dg/attributes/method-attribute-2.m: Likewise.
* objc.dg/exceptions-3.m: Likewise.
* objc.dg/exceptions-4.m: Likewise.
* objc.dg/exceptions-5.m: Likewise.
* objc.dg/param-1.m: Likewise.
* objc.dg/property/at-property-23.m: Likewise.
* objc.dg/property/dotsyntax-17.m: Likewise.
* objc.dg/property/property-neg-7.m: Likewise.
2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org> 2019-01-09 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/68426 PR fortran/68426
......
namespace { namespace {
struct b; // { dg-lto-message "type 'struct b' defined in anonymous namespace can not match across the translation unit boundary" } struct b; // { dg-lto-message "type 'struct b' defined in anonymous namespace cannot match across the translation unit boundary" }
} }
enum vals {aa,bb,cc}; // { dg-lto-message "an enum with different value name is defined in another translation unit" } enum vals {aa,bb,cc}; // { dg-lto-message "an enum with different value name is defined in another translation unit" }
struct a { // { dg-lto-message "a different type is defined in another translation unit" } struct a { // { dg-lto-message "a different type is defined in another translation unit" }
......
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
! !
! Contributed by Vittorio Zecca <zeccav@gmail.com> ! Contributed by Vittorio Zecca <zeccav@gmail.com>
common/sub/ a ! { dg-error "can not have the EXTERNAL attribute" } common/sub/ a ! { dg-error "cannot have the EXTERNAL attribute" }
external sub external sub
end end
...@@ -37,9 +37,9 @@ contains ...@@ -37,9 +37,9 @@ contains
subroutine test subroutine test
integer :: i integer :: i
type(grid) :: g type(grid) :: g
g = new_field()%mesh ! { dg-error "can not be a function reference" } g = new_field()%mesh ! { dg-error "cannot be a function reference" }
call new_field()%mesh%new_grid() ! { dg-error "Syntax error" } call new_field()%mesh%new_grid() ! { dg-error "Syntax error" }
i = new_field() % mesh%new_int() ! { dg-error "can not be a function reference" } i = new_field() % mesh%new_int() ! { dg-error "cannot be a function reference" }
end subroutine end subroutine
end module end module
...@@ -26,10 +26,10 @@ subroutine test1() ...@@ -26,10 +26,10 @@ subroutine test1()
end do end do
! Invalid: io-implied-do ! Invalid: io-implied-do
print *, (i, i=1,5 ) ! { dg-error "PROTECTED and can not appear in a variable definition context .iterator variable." } print *, (i, i=1,5 ) ! { dg-error "PROTECTED and cannot appear in a variable definition context .iterator variable." }
! Invalid: do-variable in a do-stmt ! Invalid: do-variable in a do-stmt
do i = 1, 5 ! { dg-error "PROTECTED and can not appear in a variable definition context .iterator variable." } do i = 1, 5 ! { dg-error "PROTECTED and cannot appear in a variable definition context .iterator variable." }
end do end do
end subroutine test1 end subroutine test1
......
...@@ -11,8 +11,8 @@ function j(k1, k2, k3) ...@@ -11,8 +11,8 @@ function j(k1, k2, k3)
end function end function
program pr50555 program pr50555
namelist /i/ j namelist /i/ j
call g(k,l,i) ! { dg-error "can not be an argument" } call g(k,l,i) ! { dg-error "cannot be an argument" }
f(k,l,i)=0 ! { dg-error "can not be an argument" } f(k,l,i)=0 ! { dg-error "cannot be an argument" }
h = j(k,l,i) ! { dg-error "can not be an argument" } h = j(k,l,i) ! { dg-error "cannot be an argument" }
end program end program
! Note: -std=gnu needed because line 15 function statement is obsolescent ! Note: -std=gnu needed because line 15 function statement is obsolescent
! { dg-do compile } ! { dg-do compile }
! Test case from PR61933. ! Test case from PR61933.
LOGICAL :: file_exists LOGICAL :: file_exists
INQUIRE(UNIT=-1,EXIST=file_exists)! { dg-error "can not be -1" } INQUIRE(UNIT=-1,EXIST=file_exists)! { dg-error "cannot be -1" }
INQUIRE(UNIT=-2,EXIST=file_exists)! { dg-error "can not be -2" } INQUIRE(UNIT=-2,EXIST=file_exists)! { dg-error "cannot be -2" }
END END
...@@ -12,7 +12,7 @@ end module m ...@@ -12,7 +12,7 @@ end module m
pure subroutine foo() pure subroutine foo()
use m use m
call bar(x) ! { dg-error "can not appear in a variable definition context" } call bar(x) ! { dg-error "cannot appear in a variable definition context" }
call bar2(x) ! { dg-error "is local to a PURE procedure and has the POINTER attribute" } call bar2(x) ! { dg-error "is local to a PURE procedure and has the POINTER attribute" }
call bb(y) ! { dg-error "is local to a PURE procedure and has the POINTER attribute" } call bb(y) ! { dg-error "is local to a PURE procedure and has the POINTER attribute" }
contains contains
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
@end @end
@implementation obj @implementation obj
- (int) depmth __attribute__((deprecated)) { return var; } /* { dg-warning "method attributes can not be specified in @implementation context" } */ - (int) depmth __attribute__((deprecated)) { return var; } /* { dg-warning "method attributes cannot be specified in @implementation context" } */
- (int) depmtharg:(int) iarg { return var + iarg ; } - (int) depmtharg:(int) iarg { return var + iarg ; }
- (int) unusedarg:(int) __attribute__((unused)) uarg { return var; } - (int) unusedarg:(int) __attribute__((unused)) uarg { return var; }
- (int) depunusedarg:(int) __attribute__((unused)) uarg { return var; } - (int) depunusedarg:(int) __attribute__((unused)) uarg { return var; }
......
...@@ -51,7 +51,7 @@ int test (id object) ...@@ -51,7 +51,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (id <MyProtocol> x) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (id <MyProtocol> x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
...@@ -63,7 +63,7 @@ int test (id object) ...@@ -63,7 +63,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (MyObject <MyProtocol> *x) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (MyObject <MyProtocol> *x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
...@@ -86,7 +86,7 @@ int test (id object) ...@@ -86,7 +86,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
......
...@@ -44,7 +44,7 @@ int test (id object) ...@@ -44,7 +44,7 @@ int test (id object)
dummy++; dummy++;
} }
@catch (id <MyProtocol x) /* { dg-error "expected ... before .x." } */ @catch (id <MyProtocol x) /* { dg-error "expected ... before .x." } */
{ /* { dg-error "@catch parameter can not be protocol-qualified" "" { target *-*-* } .-1 } */ { /* { dg-error "@catch parameter cannot be protocol-qualified" "" { target *-*-* } .-1 } */
dummy++; dummy++;
} }
@catch MyObject *x /* { dg-error "expected ... before .MyObject." } */ @catch MyObject *x /* { dg-error "expected ... before .MyObject." } */
......
...@@ -51,7 +51,7 @@ int test (id object) ...@@ -51,7 +51,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (id <MyProtocol>) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (id <MyProtocol>) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
...@@ -63,7 +63,7 @@ int test (id object) ...@@ -63,7 +63,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (MyObject <MyProtocol> *) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (MyObject <MyProtocol> *) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
...@@ -87,7 +87,7 @@ int test (id object) ...@@ -87,7 +87,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
......
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
{ {
Class isa; Class isa;
} }
@property int a[8]; /* { dg-error "property can not be an array" } */ @property int a[8]; /* { dg-error "property cannot be an array" } */
@property int b:8; /* { dg-error "expected" } */ @property int b:8; /* { dg-error "expected" } */
@property int c[]; /* { dg-error "property can not be an array" } */ @property int c[]; /* { dg-error "property cannot be an array" } */
/* { dg-error "forbids flexible array member" "flexible array member" { target *-*-* } .-1 } */ /* { dg-error "forbids flexible array member" "flexible array member" { target *-*-* } .-1 } */
@end @end
...@@ -35,19 +35,19 @@ int main (void) ...@@ -35,19 +35,19 @@ int main (void)
{ {
MyRootClass *object = [[MyRootClass alloc] init]; MyRootClass *object = [[MyRootClass alloc] init];
object.count = 10; /* { dg-error "readonly property can not be set" } */ object.count = 10; /* { dg-error "readonly property cannot be set" } */
if (object.count != 10) /* Ok */ if (object.count != 10) /* Ok */
abort (); abort ();
/* Test errors when trying to change a readonly property using /* Test errors when trying to change a readonly property using
pre/post increment/decrement operators. */ pre/post increment/decrement operators. */
object.count++; /* { dg-error "readonly property can not be set" } */ object.count++; /* { dg-error "readonly property cannot be set" } */
++object.count; /* { dg-error "readonly property can not be set" } */ ++object.count; /* { dg-error "readonly property cannot be set" } */
object.count--; /* { dg-error "readonly property can not be set" } */ object.count--; /* { dg-error "readonly property cannot be set" } */
--object.count; /* { dg-error "readonly property can not be set" } */ --object.count; /* { dg-error "readonly property cannot be set" } */
/* Test errors when trying to change something using Objective-C 2.0 /* Test errors when trying to change something using Objective-C 2.0
dot-syntax but there is a setter but no getter. */ dot-syntax but there is a setter but no getter. */
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
void foo (NSArray *ans[], id pid, id apid[], int i) { void foo (NSArray *ans[], id pid, id apid[], int i) {
NSArray *test; NSArray *test;
test.count = 1; /* { dg-error "readonly property can not be set" } */ test.count = 1; /* { dg-error "readonly property cannot be set" } */
((NSArray *)pid).count = 1; /* { dg-error "readonly property can not be set" } */ ((NSArray *)pid).count = 1; /* { dg-error "readonly property cannot be set" } */
((NSArray *)apid[i]).count = 1; /* { dg-error "readonly property can not be set" } */ ((NSArray *)apid[i]).count = 1; /* { dg-error "readonly property cannot be set" } */
ans[i].count = 3; /* { dg-error "readonly property can not be set" } */ ans[i].count = 3; /* { dg-error "readonly property cannot be set" } */
} }
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
@end @end
@implementation obj @implementation obj
- (int) depmth __attribute__((deprecated)) { return var; } /* { dg-warning "method attributes can not be specified in @implementation context" } */ - (int) depmth __attribute__((deprecated)) { return var; } /* { dg-warning "method attributes cannot be specified in @implementation context" } */
- (int) depmtharg:(int) iarg { return var + iarg ; } - (int) depmtharg:(int) iarg { return var + iarg ; }
- (int) unusedarg:(int) __attribute__((unused)) uarg { return var; } - (int) unusedarg:(int) __attribute__((unused)) uarg { return var; }
- (int) depunusedarg:(int) __attribute__((unused)) uarg { return var; } - (int) depunusedarg:(int) __attribute__((unused)) uarg { return var; }
......
...@@ -51,7 +51,7 @@ int test (id object) ...@@ -51,7 +51,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (id <MyProtocol> x) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (id <MyProtocol> x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
...@@ -63,7 +63,7 @@ int test (id object) ...@@ -63,7 +63,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (MyObject <MyProtocol> *x) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (MyObject <MyProtocol> *x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
...@@ -87,7 +87,7 @@ int test (id object) ...@@ -87,7 +87,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (MyObjectTypedef <MyProtocol> *x) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
......
...@@ -44,7 +44,7 @@ int test (id object) ...@@ -44,7 +44,7 @@ int test (id object)
dummy++; dummy++;
} }
@catch (id <MyProtocol x) /* { dg-error "expected ... before .x." } */ @catch (id <MyProtocol x) /* { dg-error "expected ... before .x." } */
{ /* { dg-error "@catch parameter can not be protocol-qualified" "" { target *-*-* } .-1 } */ { /* { dg-error "@catch parameter cannot be protocol-qualified" "" { target *-*-* } .-1 } */
dummy++; dummy++;
} }
@catch MyObject *x /* { dg-error "expected ... before .MyObject." } */ @catch MyObject *x /* { dg-error "expected ... before .MyObject." } */
......
...@@ -51,7 +51,7 @@ int test (id object) ...@@ -51,7 +51,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (id <MyProtocol>) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (id <MyProtocol>) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
...@@ -63,7 +63,7 @@ int test (id object) ...@@ -63,7 +63,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (MyObject <MyProtocol> *) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (MyObject <MyProtocol> *) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
...@@ -87,7 +87,7 @@ int test (id object) ...@@ -87,7 +87,7 @@ int test (id object)
} }
@try { @throw object; } @try { @throw object; }
@catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "@catch parameter can not be protocol-qualified" } */ @catch (MyObjectTypedef <MyProtocol> *) /* { dg-error "@catch parameter cannot be protocol-qualified" } */
{ {
dummy++; dummy++;
} }
......
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
@end @end
@interface bar @interface bar
-(void) my_method:(foo) my_param; /* { dg-error "can not use an object as parameter to a method" } */ -(void) my_method:(foo) my_param; /* { dg-error "cannot use an object as parameter to a method" } */
@end @end
@implementation bar @implementation bar
-(void) my_method:(foo) my_param /* { dg-error "can not use an object as parameter to a method" } */ -(void) my_method:(foo) my_param /* { dg-error "cannot use an object as parameter to a method" } */
{ {
} }
@end @end
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
{ {
Class isa; Class isa;
} }
@property int a[8]; /* { dg-error "property can not be an array" } */ @property int a[8]; /* { dg-error "property cannot be an array" } */
@property int b:8; /* { dg-error "property can not be a bit-field" } */ @property int b:8; /* { dg-error "property cannot be a bit-field" } */
@property int c[]; /* { dg-error "property can not be an array" } */ @property int c[]; /* { dg-error "property cannot be an array" } */
@end @end
...@@ -35,19 +35,19 @@ int main (void) ...@@ -35,19 +35,19 @@ int main (void)
{ {
MyRootClass *object = [[MyRootClass alloc] init]; MyRootClass *object = [[MyRootClass alloc] init];
object.count = 10; /* { dg-error "readonly property can not be set" } */ object.count = 10; /* { dg-error "readonly property cannot be set" } */
if (object.count != 10) /* Ok */ if (object.count != 10) /* Ok */
abort (); abort ();
/* Test errors when trying to change a readonly property using /* Test errors when trying to change a readonly property using
pre/post increment/decrement operators. */ pre/post increment/decrement operators. */
object.count++; /* { dg-error "readonly property can not be set" } */ object.count++; /* { dg-error "readonly property cannot be set" } */
++object.count; /* { dg-error "readonly property can not be set" } */ ++object.count; /* { dg-error "readonly property cannot be set" } */
object.count--; /* { dg-error "readonly property can not be set" } */ object.count--; /* { dg-error "readonly property cannot be set" } */
--object.count; /* { dg-error "readonly property can not be set" } */ --object.count; /* { dg-error "readonly property cannot be set" } */
/* Test errors when trying to change something using Objective-C 2.0 /* Test errors when trying to change something using Objective-C 2.0
dot-syntax but there is a setter but no getter. */ dot-syntax but there is a setter but no getter. */
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
void foo (NSArray *ans[], id pid, id apid[], int i) { void foo (NSArray *ans[], id pid, id apid[], int i) {
NSArray *test; NSArray *test;
test.count = 1; /* { dg-error "readonly property can not be set" } */ test.count = 1; /* { dg-error "readonly property cannot be set" } */
((NSArray *)pid).count = 1; /* { dg-error "readonly property can not be set" } */ ((NSArray *)pid).count = 1; /* { dg-error "readonly property cannot be set" } */
((NSArray *)apid[i]).count = 1; /* { dg-error "readonly property can not be set" } */ ((NSArray *)apid[i]).count = 1; /* { dg-error "readonly property cannot be set" } */
ans[i].count = 3; /* { dg-error "readonly property can not be set" } */ ans[i].count = 3; /* { dg-error "readonly property cannot be set" } */
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment