https://gcc.gnu.org/bugzilla/show_bug.cgi?id=32957

--- Comment #9 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Dominique d'Humieres from comment #8)
> > So is this fixed now?
> 
> I have spotted some new tests requiring c_int:
> 
> --- ../_clean/gcc/testsuite/gfortran.dg/bind_c_usage_24.f90   2018-02-18
> 00:40:36.000000000 +0100
> +++ ../p_work/gcc/testsuite/gfortran.dg/bind_c_usage_24.f90   2018-05-12
> 16:01:26.000000000 +0200
> @@ -30,9 +30,10 @@ contains
>  end module m
>  
>  program test
> +  use iso_c_binding
>    use m
>    implicit none
> -  integer :: val
> +  integer(c_int) :: val
>  
>    val = 4
>    call c_proc (.false._c_bool)
> --- ../_clean/gcc/testsuite/gfortran.dg/internal_dummy_4.f08  2018-02-18
> 00:40:40.000000000 +0100
> +++ ../p_work/gcc/testsuite/gfortran.dg/internal_dummy_4.f08  2018-05-12
> 16:01:29.000000000 +0200
> @@ -39,11 +39,11 @@ end module test_mod
>  program main
>    use test_mod
>    implicit none
> -  integer :: a
> +  integer(c_int) :: a
>    a = 33
> -  call test_sub (one, a, 7*33)
> +  call test_sub (one, a, 7_c_int*33_c_int)
>    a = 23
> -  call test_func(two, a, -123*23)
> +  call test_func(two, a, -123_c_int*23_c_int)
>  contains
>    subroutine one(x) bind(c)
>       integer(c_int),intent(inout) :: x

Well, please send this part to the list for review anyways, even if it still
leaves some other parts un-fixed.

> 
> There is also a problem with gfortran.dg/bind_c_usage_10.f03 I have been
> unable to fix:
> 
> /opt/gcc/_clean/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03:66:31:
> 
>    integer(c_int) function func4()
>                                1
> Error: FUNCTION result func4 can't be of type INTEGER(4) in FUNCTION func4
> at (1)
> /opt/gcc/_clean/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03:59:31:
> 
>    integer(c_int) function func3() bind(c, name="myFunc3")
>                                1
> Error: FUNCTION result func3 can't be of type INTEGER(4) in FUNCTION func3
> at (1)
> /opt/gcc/_clean/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03:52:31:
> 
>    integer(c_int) function func2()
>                                1
> Error: FUNCTION result func2 can't be of type INTEGER(4) in FUNCTION func2
> at (1)
> /opt/gcc/_clean/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03:45:31:
> 
>    integer(c_int) function func1() bind(c, name="myFunc1")
>                                1
> Error: FUNCTION result func1 can't be of type INTEGER(4) in FUNCTION func1
> at (1)

Reply via email to