public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tobias Burnus <burnus@net-b.de>
To: Janus Weil <janus@gcc.gnu.org>
Cc: Mikael Morin <mikael.morin@sfr.fr>,
	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: Tue, 16 Apr 2013 16:19:00 -0000	[thread overview]
Message-ID: <516D3AA0.4000106@net-b.de> (raw)
In-Reply-To: <CAKwh3qisVT4RU8=pGh9D6O3HCMCAp3YC_W=Pqb9waZ7SsMiYqQ@mail.gmail.com>

Janus Weil wrote:
> As the comment says which the patch is removing, the gfc_match_varspec
> should be relevant for cases like this:
>
> print *,char_func()(1:3)
> print *,array_func()(2)
> print *,derived_type_func()%comp
>
> Are we sure that all of these are actually invalid? (At least they are
> rejected by gfortran.) Or are there other cases which would be valid?

They are all invalid. The only exception is that a function itself is 
regarded as variable (if it returns a pointer):

    f() = 5

That's a new Fortran 2008 feature, which caused quite some trouble with 
user-defined operators, e.g. something like:

   123 .foo. 5 = ...

where "123" could be an argument (binary operator) or a label (+plus 
unary operator). (When we implement it, we should do some careful 
interpretation-request reading.)

However, I think that doesn't affect the code you are removing. 
(Disclaimer: I haven't looked at the actual patch.)

Tobias

      reply	other threads:[~2013-04-16 11:48 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
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 [this message]

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=516D3AA0.4000106@net-b.de \
    --to=burnus@net-b.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=janus@gcc.gnu.org \
    --cc=mikael.morin@sfr.fr \
    /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).