public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/53800] New: [OOP] Wrong copy-in/copy-out when passing CLASS array to assumed-shape TYPE
@ 2012-06-28 20:28 burnus at gcc dot gnu.org
2012-06-28 20:36 ` [Bug fortran/53800] " dominiq at lps dot ens.fr
0 siblings, 1 reply; 2+ messages in thread
From: burnus at gcc dot gnu.org @ 2012-06-28 20:28 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53800
Bug #: 53800
Summary: [OOP] Wrong copy-in/copy-out when passing CLASS array
to assumed-shape TYPE
Classification: Unclassified
Product: gcc
Version: 4.8.0
Status: UNCONFIRMED
Keywords: wrong-code
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
The reason for problem is that we do not have a stride multiplier.
See http://j3-fortran.org/pipermail/j3/2012-June/005438.html and
http://j3-fortran.org/pipermail/j3/2012-June/005445.html
program class_to_type
implicit none
type t
integer :: i
end type t
type, extends(t) :: t2
integer :: j
end type t2
class(t), target, allocatable :: A(:,:)
type(t), pointer :: ptr
allocate(t2 :: A(5,5))
a(:,:)%i = 53
a(3,3)%i = 42
a(4,4)%i = 74
call f(a)
print *,ptr%i
a(3,3)%i = 999
print *,ptr%i
contains
subroutine f(x)
type(t), target :: x(:,:)
ptr => x(3,3)
end subroutine f
end program class_to_type
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug fortran/53800] [OOP] Wrong copy-in/copy-out when passing CLASS array to assumed-shape TYPE
2012-06-28 20:28 [Bug fortran/53800] New: [OOP] Wrong copy-in/copy-out when passing CLASS array to assumed-shape TYPE burnus at gcc dot gnu.org
@ 2012-06-28 20:36 ` dominiq at lps dot ens.fr
0 siblings, 0 replies; 2+ messages in thread
From: dominiq at lps dot ens.fr @ 2012-06-28 20:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53800
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2012-06-28 20:35:58 UTC ---
Related to pr34640 and pr46339?
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-28 20:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-28 20:28 [Bug fortran/53800] New: [OOP] Wrong copy-in/copy-out when passing CLASS array to assumed-shape TYPE burnus at gcc dot gnu.org
2012-06-28 20:36 ` [Bug fortran/53800] " dominiq at lps dot ens.fr
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).