public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/53800] New: [OOP] Wrong copy-in/copy-out when passing CLASS array to assumed-shape TYPE Date: Thu, 28 Jun 2012 20:28:00 -0000 [thread overview] Message-ID: <bug-53800-4@http.gcc.gnu.org/bugzilla/> (raw) 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
next reply other threads:[~2012-06-28 20:28 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-06-28 20:28 burnus at gcc dot gnu.org [this message] 2012-06-28 20:36 ` [Bug fortran/53800] " dominiq at lps dot ens.fr
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-53800-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).