public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "pault at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/15809] ICE Using Pointer Functions Date: Tue, 22 Nov 2005 20:16:00 -0000 [thread overview] Message-ID: <20051122201607.15909.qmail@sourceware.org> (raw) In-Reply-To: <bug-15809-7776@http.gcc.gnu.org/bugzilla/> ------- Comment #17 from pault at gcc dot gnu dot org 2005-11-22 20:16 ------- I have started to see a light at the end of the tunnel. Going back to easier but related things, I have found that this is broken, as is its character cousin: integer, DIMENSION(:), POINTER :: ptr allocate (ptr(2)) ptr = 123 call a (ptr, 12) IF ( .NOT. ASSOCIATED(ptr) ) THEN print *, "not associated in MAIN" else print *, "associated in MAIN ", size(ptr,1), ptr END IF contains SUBROUTINE A(p, l) integer, DIMENSION(:), POINTER :: p integer, DIMENSION(2), target :: t t = 456 IF ( .NOT. ASSOCIATED(p) ) THEN p => t print *, "not associated in A ", size(p,1), p else print *, "associated in A ", size(p,1), p t = 789 p => t END IF END SUBROUTINE A end The subroutine works but the wrong result is returned. The reason for this is now abundantly clear, although why it was not so before is not....*sigh* A pointer array is passed as an array descriptor; this means that the value is not returned if the association is changed! I have most of the way cured this, up to backend complaints about violating the sanctity of pointers (I need to get the PARM_DECL to be of the right type but have all the indirect referencing sorted out.). Paul -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15809
next prev parent reply other threads:[~2005-11-22 20:16 UTC|newest] Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <bug-15809-7776@http.gcc.gnu.org/bugzilla/> 2005-10-23 13:34 ` sven dot buijssen at math dot uni-dortmund dot de 2005-11-21 15:53 ` pault at gcc dot gnu dot org 2005-11-21 18:06 ` sven dot buijssen at math dot uni-dortmund dot de 2005-11-21 18:08 ` Tobias dot Schlueter at physik dot uni-muenchen dot de 2005-11-22 20:16 ` pault at gcc dot gnu dot org [this message] 2005-11-23 14:26 ` paul dot richard dot thomas at cea dot fr 2005-11-30 17:26 ` pault at gcc dot gnu dot org 2005-11-30 19:26 ` pault at gcc dot gnu dot org 2005-12-05 11:14 ` jakub at gcc dot gnu dot org 2005-12-07 6:20 ` pault at gcc dot gnu dot org 2005-12-12 20:10 ` pinskia at gcc dot gnu dot org 2004-06-03 20:12 [Bug fortran/15809] New: " giese025 at tc dot umn dot edu 2004-06-03 20:13 ` [Bug fortran/15809] " giese025 at tc dot umn dot edu 2004-06-03 20:21 ` pinskia at gcc dot gnu dot org 2004-07-11 17:10 ` tobi at gcc dot gnu dot org 2004-08-25 22:10 ` tobi at gcc dot gnu dot org 2004-09-22 7:48 ` c dot lemmen at fz-juelich dot de 2004-12-14 17:53 ` pinskia at gcc dot gnu dot org 2005-04-03 2:25 ` szalai at mit dot edu 2005-06-05 22:44 ` pault at gcc dot gnu dot org 2005-08-30 20:44 ` erik dot edelmann at iki dot fi 2005-08-31 19:39 ` tobi at gcc dot gnu dot org 2005-09-02 11:34 ` tobi at gcc dot gnu dot org 2005-09-02 11:58 ` erik dot edelmann at iki dot fi 2005-09-02 15:39 ` Tobias dot Schlueter at physik dot uni-muenchen dot de 2005-09-06 21:10 ` erik dot edelmann at iki dot fi 2005-09-08 18:51 ` rsandifo at gcc dot gnu dot org 2005-09-18 19:53 ` tkoenig 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=20051122201607.15909.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).