public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pault at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/52010] [OOP] Intrinsic assignment of a CLASS to a TYPE Date: Tue, 30 Dec 2014 03:12:00 -0000 [thread overview] Message-ID: <bug-52010-4-RhzgjdGhfg@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-52010-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52010 Paul Thomas <pault at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |damian at sourceryinstitute dot or | |g --- Comment #8 from Paul Thomas <pault at gcc dot gnu.org> --- In fact, it appears that both tests are fixed by the current patch in PR63205. This works fine: module m_test implicit none type ta private integer :: i = 99 contains procedure :: suba end type ta type tb private class(ta), pointer :: pa => null() contains procedure :: disp end type tb contains function suba( a, v) result(b) class(ta), target, intent(inout) :: a type(tb) :: b integer :: v a%i = v b%pa => a end function suba subroutine disp (arg) class(tb), intent(in) :: arg print *, arg%pa%i end subroutine end module m_test use m_test class(ta), allocatable :: tgt type(tb) :: PTR allocate (tgt) ptr = tgt%suba(42) call ptr%disp deallocate (tgt) end Paul
next prev parent reply other threads:[~2014-12-30 3:12 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2012-01-26 15:55 [Bug fortran/52010] New: Intrinsic assignment involving CLASS/TYPE fmartinez at gmv dot com 2012-01-26 18:40 ` [Bug fortran/52010] " dominiq at lps dot ens.fr 2012-01-26 18:42 ` fmartinez at gmv dot com 2012-01-27 17:07 ` [Bug fortran/52010] [OOP] Intrinsic assignment of a CLASS to a TYPE burnus at gcc dot gnu.org 2012-01-28 19:09 ` dominiq at lps dot ens.fr 2012-01-28 23:38 ` fmartinez at gmv dot com 2012-01-28 23:40 ` fmartinez at gmv dot com 2014-12-29 3:46 ` pault at gcc dot gnu.org 2014-12-30 3:12 ` pault at gcc dot gnu.org [this message] 2015-10-18 20:54 ` dominiq at lps dot ens.fr 2015-10-19 4:40 ` paul.richard.thomas at gmail dot com
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-52010-4-RhzgjdGhfg@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).