This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/36059] New: -frepack-arrays: symbols w/ TARGET should not be repacked
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 27 Apr 2008 08:20:46 -0000
- Subject: [Bug fortran/36059] New: -frepack-arrays: symbols w/ TARGET should not be repacked
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
See thread at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/e9add97708681397
Full example, reported by James Van Buskirk, see
http://groups.google.com/group/comp.lang.fortran/msg/9c42edc4620a1cff
Using -frepack-arrays, the dummy array "x" is repacked in the function. This
repacking should not happen if the TARGET attribute is present as this can lead
to wrong code. (The result symbol "point" points to the repacked array and not
to the original array.)
function point(x)
real, intent(in), target :: x(:)
type(C_PTR) point
real, pointer :: p
p => x(2)
point = C_LOC(p)
end function point
--
Summary: -frepack-arrays: symbols w/ TARGET should not be
repacked
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: burnus at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36059