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/67311] ICE calling subroutine with derived type as argument within OpenMP parallel region Date: Mon, 24 Aug 2015 19:11:00 -0000 [thread overview] Message-ID: <bug-67311-4-njOHvz652t@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-67311-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67311 --- Comment #5 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #2) > Ugh, Fortran really allows this mess (effectively self-referential types)? It has to - otherwise how to you implement linked lists? However, I don't know what this is supposed to do in the context of OpenMP. For coarrays, pointer components are ignored in the context of copying them to other processes ("images") only directly accessing their values is permitted. If OpenMP works likewise, I'd expect that only the nonpointer components are created as private object and that the status of the pointer components is undefined. > But if the type has allocatable components, is there anything that would > prevent the need for endless recursion when actually generating code to > expand it? > Or is here only POINTER allowed and not ALLOCATABLE? > TYPE myType > TYPE(myType), DIMENSION(:), ALLOCATABLE :: x > END TYPE myType Fortran 2008 allows allocatable components, which gfortran does not support (unless I missed an addition in the last few months). However, that requires explicit action, i.e. you allocate the component. Then you can access it and allocate its component etc. That chain is finite and the innermost one has the allocation status unallocated (internally, it points to NULL). And as no loops are possible and no alising within the type, one can simply walk it.
next prev parent reply other threads:[~2015-08-24 19:11 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-08-21 17:37 [Bug fortran/67311] New: " acreman at astro dot ex.ac.uk 2015-08-21 18:36 ` [Bug fortran/67311] " dominiq at lps dot ens.fr 2015-08-24 18:33 ` jakub at gcc dot gnu.org 2015-08-24 18:57 ` mikael at gcc dot gnu.org 2015-08-24 18:59 ` jakub at gcc dot gnu.org 2015-08-24 19:11 ` burnus at gcc dot gnu.org [this message] 2015-08-24 19:35 ` mikael at gcc dot gnu.org 2020-06-24 17:57 ` burnus at gcc dot gnu.org 2020-06-25 15:15 ` burnus at gcc dot gnu.org 2020-07-14 10:57 ` cvs-commit at gcc dot gnu.org 2020-07-14 11:12 ` burnus at gcc dot gnu.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=bug-67311-4-njOHvz652t@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).