public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Mikael Morin <mikael.morin@sfr.fr>
To: Tobias Burnus <burnus@net-b.de>
Cc: gcc patches <gcc-patches@gcc.gnu.org>, gfortran <fortran@gcc.gnu.org>
Subject: Re: [Patch,Fortran] PR 40632 - Add CONTIGUOUS attribute (part 1)
Date: Mon, 21 Jun 2010 11:55:00 -0000	[thread overview]
Message-ID: <4C1F4818.2080301@sfr.fr> (raw)
In-Reply-To: <4C1D3E14.1080704@net-b.de>

On 20.06.2010 00:00, Tobias Burnus wrote:
> Dear all, hi Mikael,
Hi,

>
> here comes an updated patch.
>
> On 19.06.2010 09:45, Mikael Morin wrote:
>> The error message is a bit cryptic to me.
>
> Since there were no better suggestion, I kept it. Hopefully, no one will
> run into this message.

On second thought, your sentence is fine.
Maybe add a comma before "as actual argument..." ; I was somehow trying 
to attach the latter part of the sentence with the one just before and 
couldn't make any sense out of it.

>
>>> +  for (ref = expr->ref; ref; ref = ref->next)
>>> +    {
>>> +      if (ref->type == REF_COMPONENT)
>>> +    part_ref  = ref;
>>> +      else if (ref->type == REF_SUBSTRING)
>>> +      return false;
>>> +      else
>>> +    {
>>> +      if (ar)
>>> +        return false; /* Array shall be last part-ref. */
>> I think this should be outside the else block. For array(:)%component
>> cases.
>
> I have moved it before REF_COMPONENT.
>
>>> +  gcc_assert (ar->type != AR_UNKNOWN);
>> You can even assert that ar->type == AR_SECTION.
> Done.
>
>> I think you are not rejecting the case array(:,1,:)
> Fixed - and added a test case.
>
>
> Additional fixes in trans-array.c's gfc_conv_array_parameter:
>
> * I now use gfc_is_simply_contiguous for no_pack, which is shorter and
> more correct
>
> * I had completely forgotten about passing "array(::2)" to " ...,
> contiguous :: dummy(:)". The standard says (slightly hidden) that this
> is valid and that a copy-in/copy-out can happen if the variable is not
> simply contiguous (cf. 12.5.2.13 and 12.3.3 [paragraph 9 and 10]). Well,
> that's what the patch now does: It (un)packs the array if needed. (+
> test case added)
It was the first patch and was supposed to be parsing/erroring only, 
right ? ;-)

>
>
> Build and regtested on x86-64-linux.
> OK for the trunk?
OK, thanks.

  reply	other threads:[~2010-06-21 11:08 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-18 16:52 Tobias Burnus
2010-06-19  3:57 ` Tobias Burnus
2010-06-19 11:34   ` Mikael Morin
2010-06-19 12:34     ` Tobias Burnus
2010-06-20 10:00     ` Tobias Burnus
2010-06-21 11:55       ` Mikael Morin [this message]
2010-06-21 15:24         ` 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=4C1F4818.2080301@sfr.fr \
    --to=mikael.morin@sfr.fr \
    --cc=burnus@net-b.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@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).