From 7260547dbffd8e6442f99da8adf98ab0ce294e4e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20K=C3=B6nig?= Date: Sun, 23 Feb 2020 17:04:06 +0100 Subject: [PATCH] Fix error message. 2020-02-23 Thomas Koenig PR fortran/93890 * interface.c: Replace "can not" by "cannot" and remove trailing space. 2020-02-23 Thomas Koenig PR fortran/93890 * gfortran.dg/argument_checking_24.f90: Correct test case. --- gcc/fortran/ChangeLog | 6 ++++++ gcc/fortran/interface.c | 4 ++-- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gfortran.dg/argument_checking_24.f90 | 8 ++++---- 4 files changed, 17 insertions(+), 6 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 6795b82b74c..5f889fb3120 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2020-02-23 Thomas Koenig + + PR fortran/93890 + * interface.c: Replace "can not" by "cannot" and remove trailing + space. + 2020-02-20 Tobias Burnus PR fortran/93825 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/ChangeLog b/gcc/testsuite/ChangeLog index fe9362434ac..06d61c7e2ee 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-02-23 Thomas Koenig + + PR fortran/93890 + * gfortran.dg/argument_checking_24.f90: Correct test case. + 2020-02-21 Martin Sebor PR gcov-profile/93753 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) -- 2.30.2