This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53668] New: Do some Cray-pointer fixes
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 14 Jun 2012 09:07:49 +0000
- Subject: [Bug fortran/53668] New: Do some Cray-pointer fixes
- Auto-submitted: auto-generated
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: unassigned@gcc.gnu.org
ReportedBy: burnus@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