public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47586] New: allocatable components: deep copy missing
@ 2011-02-02 14:09 janus at gcc dot gnu.org
2012-08-14 16:46 ` [Bug fortran/47586] [F03] " mikael at gcc dot gnu.org
2012-08-14 16:52 ` mikael at gcc dot gnu.org
0 siblings, 2 replies; 3+ messages in thread
From: janus at gcc dot gnu.org @ 2011-02-02 14:09 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47586
Summary: allocatable components: deep copy missing
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: janus@gcc.gnu.org
Follow-up to PR 47455 (comment #5):
type :: tx
integer, dimension(:), allocatable :: i
end type tx
type(tx) :: this
type(tx), target :: that
type(tx), pointer :: p
allocate(that%i(2))
that%i = [0, 0]
p => that
! this = that ! (1) direct assignment: works (deep copy)
! this = p ! (2) using a pointer works as well
this = find_x(that) ! (3) pointer function: fails (deep copy missing)
that%i = [1, 1]
print *,this%i
if(any (this%i /= [0, 0])) call abort()
contains
function find_x(that)
type(tx), target :: that
type(tx), pointer :: find_x
find_x => that
end function find_x
end
This code currently fails for the third case, while it works for the first two.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/47586] [F03] allocatable components: deep copy missing
2011-02-02 14:09 [Bug fortran/47586] New: allocatable components: deep copy missing janus at gcc dot gnu.org
@ 2012-08-14 16:46 ` mikael at gcc dot gnu.org
2012-08-14 16:52 ` mikael at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: mikael at gcc dot gnu.org @ 2012-08-14 16:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47586
--- Comment #1 from Mikael Morin <mikael at gcc dot gnu.org> 2012-08-14 16:46:07 UTC ---
Author: mikael
Date: Tue Aug 14 16:45:55 2012
New Revision: 190394
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=190394
Log:
fortran/
PR fortran/47586
* trans-expr.c (expr_is_variable): Handle regular, procedure pointer,
and typebound functions returning a data pointer.
testsuite/
PR fortran/47586
* gfortran.dg/typebound_proc_20.f90: Enable runtime test.
* gfortran.dg/typebound_proc_27.f03: New test.
Added:
trunk/gcc/testsuite/gfortran.dg/typebound_proc_27.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-expr.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gfortran.dg/typebound_proc_20.f90
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug fortran/47586] [F03] allocatable components: deep copy missing
2011-02-02 14:09 [Bug fortran/47586] New: allocatable components: deep copy missing janus at gcc dot gnu.org
2012-08-14 16:46 ` [Bug fortran/47586] [F03] " mikael at gcc dot gnu.org
@ 2012-08-14 16:52 ` mikael at gcc dot gnu.org
1 sibling, 0 replies; 3+ messages in thread
From: mikael at gcc dot gnu.org @ 2012-08-14 16:52 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47586
Mikael Morin <mikael at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
CC| |mikael at gcc dot gnu.org
Resolution| |FIXED
--- Comment #2 from Mikael Morin <mikael at gcc dot gnu.org> 2012-08-14 16:52:33 UTC ---
Fixed for 4.8.0.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-08-14 16:52 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-02 14:09 [Bug fortran/47586] New: allocatable components: deep copy missing janus at gcc dot gnu.org
2012-08-14 16:46 ` [Bug fortran/47586] [F03] " mikael at gcc dot gnu.org
2012-08-14 16:52 ` mikael at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).