public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dominiq at lps dot ens.fr" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/65223] Elemental type-bound procedure's passed object with INTENT(OUT) should be accepted with -std=f2003 (?). Date: Sat, 10 Oct 2015 14:53:00 -0000 [thread overview] Message-ID: <bug-65223-4-REh1nZqMHj@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65223-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65223 Dominique d'Humieres <dominiq at lps dot ens.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |NEW Summary|Regresion on elemental |Elemental type-bound |type-bound procedure's |procedure's passed object |passed object with |with INTENT(OUT) should be |INTENT(OUT) |accepted with -std=f2003 | |(?). --- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> --- AFAICT the condition if (sym->ts.type == BT_CLASS && sym->attr.intent == INTENT_OUT) implement the constraints C1290 (from my copy of the f2015 draft, see fortran.dg/class_dummy_5.f90 for the rationale) 1.6.4 Fortran 2003 compatibility ... 6 Fortran 2003 permitted the function result of a pure function to be a polymorphic allocatable variable, and to be finalizable by an impure final subroutine. These are not permitted by this part of ISO/IEC 1539. 7 Fortran 2003 permitted an INTENT (OUT) argument of a pure subroutine to be polymorphic; that is not permitted by this part of ISO/IEC 1539. 12.7 Pure procedures ... C1289 An INTENT (OUT) dummy argument of a pure procedure shall not be such that finalization of the actual argument would reference an impure procedure. C1290 An INTENT (OUT) dummy argument of a pure procedure shall not be polymorphic. Since the constraints are Fortran 2008, IMO the code should compile with -std=f2003. In addition I am not sure that constraint C1289 is implemented: compiling module storage_mod implicit none private save type, public :: StorageClass character(20) :: name = 'default' contains procedure, nopass :: destroy => destroyStorage end type contains elemental subroutine destroyStorage(this) type(StorageClass), intent(OUT) :: this end subroutine end module storage_mod end should give an error(?).
next prev parent reply other threads:[~2015-10-10 14:53 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-02-26 17:33 [Bug fortran/65223] New: Regresion on elemental type-bound procedure's passed object with INTENT(OUT) jwmwalrus at gmail dot com 2015-02-27 10:45 ` [Bug fortran/65223] " dominiq at lps dot ens.fr 2015-02-27 15:13 ` jwmwalrus at gmail dot com 2015-02-27 15:31 ` dominiq at lps dot ens.fr 2015-10-10 14:53 ` dominiq at lps dot ens.fr [this message] 2015-10-10 15:08 ` [Bug fortran/65223] Elemental type-bound procedure's passed object with INTENT(OUT) should be accepted with -std=f2003 (?) 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-65223-4-REh1nZqMHj@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).