http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53668
Bug #: 53668 Summary: Do some Cray-pointer fixes Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Keywords: diagnostic, missed-optimization Severity: normal Priority: P3 Component: fortran AssignedTo: unassig...@gcc.gnu.org ReportedBy: bur...@gcc.gnu.org Based on PR 53667. a) Currently, FREE() and MALLOC() call via iresolve.c the libgfortran/intrinsic/malloc.c's functions. One should call the builtins instead - the library doesn't do anything different. b) Passing an integer to a Cray pointer dummy should print a warning - both when the explicit interface is known as well as via gsym. Cray prints an error: 'The type of the actual argument, "INTEGER", does not match "Cray pointer", the type of the dummy argument.' But probably printing a warning is better - as the tricks in PR 53667 show: Better to have an integer to a Cray pointer dummy than an integer dummy with an address, which is only later converted to a Cray pointer. ! Compile with: -fcray-pointer use iso_c_binding implicit none integer(c_intptr_t) :: intptr call f(intptr) end !contains subroutine f(p) pointer (p, i) integer :: i end subroutine f !end