The following code fails (Update 1, 2016.0.1.51; both 32 bits and 64 bits.)
MODULE ti_mod USE ISO_C_BINDING IMPLICIT none PRIVATE ! INTEGER,PUBLIC,PARAMETER :: GLintptr = C_INTPTR_T ! PUBLIC :: glBsd POINTER :: glBsd INTERFACE SUBROUTINE glBsd(tg) BIND(C) ! ! The following two lines let the compilation fail: ! IMPORT :: GLintptr INTEGER(KIND=GLintptr),VALUE :: tg ! ! If the preceeding lines are replace by the following ones, everything wents fine. ! ! USE ISO_C_BINDING ! INTEGER(KIND=C_INTPTR_T),VALUE :: tg ! END SUBROUTINE glBsd END INTERFACE ! END MODULE ti_mod
Our gfortran friends do not complain! A compiler bug, I guess?