public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/40440] Automatic deallocation component of DT function return value Date: Thu, 18 Jun 2009 15:18:00 -0000 [thread overview] Message-ID: <20090618151744.6323.qmail@sourceware.org> (raw) In-Reply-To: <bug-40440-15192@http.gcc.gnu.org/bugzilla/> [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 1809 bytes --] ------- Comment #9 from burnus at gcc dot gnu dot org 2009-06-18 15:17 ------- (In reply to comment #7) > I'm still convinced that this is a problem of the compiler, since it works with the > NAG and Intel compilers. Well, compilers can have all bugs - and not all invalid programs can be diagnosed as such by a compiler. In any case, I believe gfortran has a bug (cf. comment 5 and comment 8). (In reply to comment #8) > Regarding the big program: [...] I think the big program is valid (at least with this regard) as the following applies. "If the dummy argument has the TARGET attribute, does not have the VALUE attribute, and is either a scalar or an assumed-shape array, and the corresponding actual argument has the TARGET attribute but is not an array section with a vector subscript then (1) Any pointers associated with the actual argument become associated with the corresponding dummy argument on invocation of the procedure and (2) When execution of the procedure completes, any pointers that do not become undefined (16.4.2.1.3) and are associated with the dummy argument remain associated with the actual argument." [F2003, 12.4.1.2 Actual arguments associated with dummy data objects] And in "16.4.2.1.3 Events that cause the association status of pointers to become undefined". Relevant would be for instance: "(4) Execution of a RETURN or END statement causes the pointers target to become undefined (item (3) of 16.5.6)," which is never the case for the PROGRAM; additionally, the SAVE preserves it even longer [(3) in 16.5.6]: "Variables become undefined as follows: [...] (3) When execution of an instance of a subprogram completes, (a) its unsaved local variables become undefined," -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40440
next prev parent reply other threads:[~2009-06-18 15:18 UTC|newest] Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-06-14 21:50 [Bug fortran/40440] New: [4.5.0 Regression] Garbage or segmentation fault in allocatable array derived type structures juergen dot reuter at desy dot de 2009-06-14 22:14 ` [Bug fortran/40440] " kargl at gcc dot gnu dot org 2009-06-14 22:19 ` juergen dot reuter at desy dot de 2009-06-15 8:52 ` [Bug fortran/40440] [4.4/4.5 " burnus at gcc dot gnu dot org 2009-06-15 12:17 ` burnus at gcc dot gnu dot org 2009-06-15 13:09 ` [Bug fortran/40440] Automatic deallocation component of DT function return value burnus at gcc dot gnu dot org 2009-06-18 9:44 ` pault at gcc dot gnu dot org 2009-06-18 13:33 ` juergen dot reuter at desy dot de 2009-06-18 14:45 ` burnus at gcc dot gnu dot org 2009-06-18 15:18 ` burnus at gcc dot gnu dot org [this message] 2009-06-18 20:52 ` pault at gcc dot gnu dot org 2009-06-18 21:15 ` burnus at gcc dot gnu dot org 2009-06-19 0:20 ` pault at gcc dot gnu dot org 2009-06-19 21:58 ` pault at gcc dot gnu dot org 2009-07-09 19:28 ` pault at gcc dot gnu dot org 2009-07-09 19:29 ` pault at gcc dot gnu dot org 2009-10-11 12:20 ` pault at gcc dot gnu dot org 2009-10-11 12:26 ` pault at gcc dot gnu dot org
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=20090618151744.6323.qmail@sourceware.org \ --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).