Am 23.02.20 um 17:11 schrieb Thomas Koenig:
Committed as simple and obvious, r10-6802-g7260547dbffd8e6442f99da8adf98ab0ce294e4e.
Better with the patch, of course.
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c index 429abc79ca2..4106fe5831b 100644 --- a/gcc/fortran/interface.c +++ b/gcc/fortran/interface.c @@ -2660,8 +2660,8 @@ compare_parameter (gfc_symbol *formal, gfc_expr *actual, { if (formal->attr.artificial) gfc_error ("Element of assumed-shape or pointer array " - "as actual argument at %L can not correspond to " - "actual argument at %L ", + "as actual argument at %L cannot correspond to " + "actual argument at %L", &actual->where, &formal->declared_at); else gfc_error ("Element of assumed-shape or pointer " diff --git a/gcc/testsuite/gfortran.dg/argument_checking_24.f90 b/gcc/testsuite/gfortran.dg/argument_checking_24.f90 index a5f3abee3a8..79096cd59af 100644 --- a/gcc/testsuite/gfortran.dg/argument_checking_24.f90 +++ b/gcc/testsuite/gfortran.dg/argument_checking_24.f90 @@ -33,14 +33,14 @@ contains call invalid_4 (b) ! { dg-error "Rank mismatch" }w call invalid_5 (b) ! { dg-error "Rank mismatch" } call invalid_5 (vv(1)%x) ! { dg-error "Rank mismatch" } - call invalid_6 (x) ! { dg-error "can not correspond to actual argument" } - call invalid_6 (pointer_v%x(1)) ! { dg-error "can not correspond to actual argument" } + call invalid_6 (x) ! { dg-error "cannot correspond to actual argument" } + call invalid_6 (pointer_v%x(1)) ! { dg-error "cannot correspond to actual argument" } call invalid_7 (pointer_v%x(1)) ! { dg-error "Rank mismatch" } call invalid_7 (x) ! { dg-error "Rank mismatch" } call invalid_8 (p(1)) ! { dg-error "Rank mismatch" } call invalid_8 (x) ! { dg-error "Rank mismatch" } - call invalid_9 (x) ! { dg-error "can not correspond to actual argument" } - call invalid_9 (p(1)) ! { dg-error "can not correspond to actual argument" } + call invalid_9 (x) ! { dg-error "cannot correspond to actual argument" } + call invalid_9 (p(1)) ! { dg-error "cannot correspond to actual argument" } end subroutine foo subroutine bar(a, alloc)