http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56378



Dominique d'Humieres <dominiq at lps dot ens.fr> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

             Status|UNCONFIRMED                 |NEW

     Ever Confirmed|0                           |1



--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2013-02-18 
19:21:18 UTC ---

If I do the following changes to the test in comment #5 in order to silence the

warnings " ... may not be C interoperable ... ":



module t

 use, intrinsic :: iso_c_binding



 interface fvec2vec

   module procedure int_fvec2vec

 end interface

contains

 function int_fvec2vec (f_vec, n) result (c_vec)

 integer f_vec(:)

 integer(c_int), target :: c_vec(n)

 end function int_fvec2vec

 subroutine lat_to_c (Fp) bind(c)

 type(c_ptr), value :: Fp

 integer(c_int) :: n1_ic



 integer, allocatable :: ic(:)

 call lat_to_c2 (c_loc(fvec2vec(ic, n1_ic)))

 end subroutine lat_to_c

end module

end



revision 158253 (2010-04-13) gives a (bogus?) error



pr56378_db.f90:17.23:



 call lat_to_c2 (c_loc(fvec2vec(ic, n1_ic)))

                       1

Error: Parameter 'fvec2vec' to 'c_loc' at (1) must be either a TARGET or an

associated pointer



while revision 162456 (2010-07-23) gives the ICE.

Reply via email to