Commit 508da9f9 by Thomas Koenig

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
parent ff5115e2
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> 2018-11-01 Nathan Sidwell <nathan@acm.org>
* g++.dg/abi/anon5.C: New. * g++.dg/abi/anon5.C: New.
......
...@@ -7,7 +7,7 @@ contains ...@@ -7,7 +7,7 @@ contains
integer(c_int) :: bar(5) integer(c_int) :: bar(5)
end function bar 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 character(kind=c_char, len=10) :: my_string_func
my_string_func = 'my_string' // C_NULL_CHAR my_string_func = 'my_string' // C_NULL_CHAR
end function my_string_func end function my_string_func
......
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