public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mikael Morin <mikael.morin@sfr.fr>
To: Janus Weil <janus@gcc.gnu.org>
Cc: gfortran <fortran@gcc.gnu.org>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [Patch, Fortran, OOP] PR 56266: ICE on invalid in gfc_match_varspec
Date: Sun, 14 Apr 2013 08:42:00 -0000	[thread overview]
Message-ID: <51697D4A.1060903@sfr.fr> (raw)
In-Reply-To: <CAKwh3qjVyi92P9AL=EH+7qCiszi7a9yOUSnpdWE2hv1OeL5z2Q@mail.gmail.com>


Le 13/04/2013 16:02, Janus Weil a écrit :
> Hi Mikael,
> 
>> So, it seems that EXPR_FUNCTION is acceptable in gfc_match_varspec.
>> And then, there is nothing preventing 'c(i)' in 'c(i)%encM()' from being
>> parsed as a function.  Is this supported?
> 
> I think this is forbidden by the Fortran standard, cf. e.g.
> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42188
> 
> Actually I'm not sure in which context a function call with sub-refs
> would be valid. One should re-check the standard on this ...
> 
Indeed, that's invalid:

structure-component is data-ref
data-ref is part-ref [ % part-ref ] ...
part-ref is part-name [ ( section-subscript-list ) ] [ image-selector ]

(R611) The leftmost part-name shall be the name of a data object.


I thought they were allowed for pointer-returning functions.

Mikael

  reply	other threads:[~2013-04-13 15:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-12 23:38 Janus Weil
2013-04-13 19:48 ` Mikael Morin
2013-04-14  1:18   ` Janus Weil
2013-04-14  8:42     ` Mikael Morin [this message]
2013-04-15 22:49       ` Mikael Morin
2013-04-15 23:11         ` Janus Weil
2013-04-16 15:07           ` Janus Weil
2013-04-16 16:19             ` Tobias Burnus

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=51697D4A.1060903@sfr.fr \
    --to=mikael.morin@sfr.fr \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=janus@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).