public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Damian Rouson <rouson@lbl.gov>
To: fortran@gcc.gnu.org
Subject: PR 107406
Date: Tue, 25 Oct 2022 22:17:22 -0700	[thread overview]
Message-ID: <CAM2rSoUpuzbHxjP+t8MHCcyi2EYuFrq+0HWGmUzUEDXtKnr6VQ@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 678 bytes --]

gfortran 12.2 accepts the code below if the "allocatable" attribute is
removed:

% cat gfortran-lock-issue.f90
  use iso_fortran_env
  type foo
    type(lock_type), allocatable :: bar
  end type
  type(foo) foobar[*]
end

 % gfortran -fcoarray=single gfortran-lock-issue.f90
gfortran-lock-issue.f90:3:39:
    3 |     type(lock_type), allocatable :: bar
      |                                       1
Error: Allocatable component bar at (1) of type LOCK_TYPE must have a
codimension

The NAG compiler accepts the above code with or without the allocatable
attribute, and I believe constraint C1608 in the Fortran 2018
interpretation document makes the above code valid.

Damian

                 reply	other threads:[~2022-10-26  5:17 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=CAM2rSoUpuzbHxjP+t8MHCcyi2EYuFrq+0HWGmUzUEDXtKnr6VQ@mail.gmail.com \
    --to=rouson@lbl.gov \
    --cc=fortran@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: link
Be 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).