re PR fortran/46020 (Improve error string for BIND(C) diagnostic for len>1 character return type)

2018-11-01  Thomas Koenig  <tkoenig@gcc.gnu.org>

    PR fortran/46020
    * gfortran.dg/bind_c_usage_7.f90: Adjust error message.
    * gfortran.dg/bind_c_usage_32.f90: New test.

From-SVN: r265716
This commit is contained in:
Thomas Koenig 2018-11-01 11:55:43 +00:00
parent ff5115e203
commit 508da9f932
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2018-11-01 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/46020
* gfortran.dg/bind_c_usage_7.f90: Adjust error message.
* gfortran.dg/bind_c_usage_32.f90: New test.
2018-11-01 Nathan Sidwell <nathan@acm.org>
* g++.dg/abi/anon5.C: New.

View File

@ -7,7 +7,7 @@ contains
integer(c_int) :: bar(5)
end function bar
function my_string_func() bind(c) ! { dg-error "cannot be a character string" }
function my_string_func() bind(c) ! { dg-error "must have length 1" }
character(kind=c_char, len=10) :: my_string_func
my_string_func = 'my_string' // C_NULL_CHAR
end function my_string_func