public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janus Weil <janus@gcc.gnu.org>
To: Paul Richard Thomas <paul.richard.thomas@gmail.com>
Cc: Mikael Morin <mikael.morin@sfr.fr>,
	Tobias Burnus <burnus@net-b.de>,
		gcc-patches <gcc-patches@gcc.gnu.org>,
	"fortran@gcc.gnu.org" <fortran@gcc.gnu.org>
Subject: Re: [Patch, fortran] PR51976 - [F2003] Support deferred-length character components of derived types (allocatable string length)
Date: Thu, 06 Mar 2014 21:20:00 -0000	[thread overview]
Message-ID: <CAKwh3qgaPTDY7cmXGkegtkthMYR4SbBTXwy5CiAn5+AysqJA_g@mail.gmail.com> (raw)
In-Reply-To: <CAGkQGiK6v5WhibMJWMOzq=npWk5N1mGFJYEFV0tL6vf9+Xp4MQ@mail.gmail.com>

Hi,

> In that case, go for it! I am on vacation in Tenerife right now and have
> very limited access.

wow, in that case I guess you better enjoy your holidays ;)


> Please commit the patch to trunk.

Will do!

Thanks,
Janus




> On Mar 6, 2014 9:59 PM, "Janus Weil" <janus@gcc.gnu.org> wrote:
>>
>> Hi Paul,
>>
>> > I am trying to respond to Mikael's comment that only kind=1 is handled.
>> > I'll
>> > use your patch as a basis.
>>
>> actually the last version of the patch that I posted yesterday should
>> already handle that (and includes a kind=4 test case). But if you find
>> any remaining problems, please let me know.
>>
>> Also Tobias already told me privately that his "mixed feeling" were
>> not strong enough to oppose against committing the patch. So right now
>> the only thing standing between the patch and trunk seems to be you ;)
>>
>> Cheers,
>> Janus
>>
>>
>>
>> > On Mar 5, 2014 2:53 PM, "Janus Weil" <janus@gcc.gnu.org> wrote:
>> >>
>> >> Hi Mikael,
>> >>
>> >> >> The patch was regtested on x86_64-unknown-linux-gnu. Ok for trunk?
>> >> >>
>> >> > I'm asking for one more minor change, namely:
>> >> >
>> >> >> @@ -12364,6 +12356,25 @@ resolve_fl_derived0 (gfc_symbol *sym)
>> >> >>         return false;
>> >> >>       }
>> >> >>
>> >> >> +      /* Add the hidden deferred length field.  */
>> >> >> +      if (c->ts.type == BT_CHARACTER && c->ts.deferred &&
>> >> >> !c->attr.function
>> >> >> +       && !sym->attr.is_class)
>> >> >> +     {
>> >> >> +       char name[GFC_MAX_SYMBOL_LEN+1];
>> >> >> +       gfc_component *strlen;
>> >> >> +       sprintf (name, "_%s", c->name);
>> >> >
>> >> > It's not more costly to have a more explicit name like "_%s_length"
>> >> > or
>> >> > something, and I prefer having the latter in complicated dumps or in
>> >> > the
>> >> > debugger.
>> >>
>> >> I agree.
>> >>
>> >>
>> >> > OK with that change, with the associated buffer size update.  Also
>> >> > Steve
>> >> > noted that the buffer size should take the terminating null character
>> >> > into account.
>> >>
>> >> Steve's comment somehow got lost in the noise. I have updated both the
>> >> name and the buffer size now in resolve_fl_derived0 as well as
>> >> gfc_deferred_strlen. Updated patch attached.
>> >>
>> >> A few people expressed mixed feelings, therefore I'll wait a couple of
>> >> days to allow the naysayers to chime in. In the absence of further
>> >> feedback, I'll commit the patch on the weekend.
>> >>
>> >> Cheers,
>> >> Janus

  parent reply	other threads:[~2014-03-06 21:20 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-24 22:43 Paul Richard Thomas
2013-02-25  9:58 ` Tobias Burnus
2013-03-19 21:17 ` Tobias Burnus
2014-02-19 15:16   ` Janus Weil
2014-02-19 15:51     ` Janus Weil
2014-02-19 21:24       ` Paul Richard Thomas
2014-02-19 22:23         ` Tobias Burnus
2014-02-22 15:39       ` Mikael Morin
2014-02-22 15:58         ` Steve Kargl
2014-03-01 15:58         ` Janus Weil
2014-03-05  9:50           ` Mikael Morin
2014-03-05 13:53             ` Janus Weil
     [not found]               ` <CAGkQGiLbe7oLHC8N7OCALdTOVP8-COyCAmCUj-AfZK_DAAHqRA@mail.gmail.com>
2014-03-06 20:59                 ` Janus Weil
     [not found]                   ` <CAGkQGiK6v5WhibMJWMOzq=npWk5N1mGFJYEFV0tL6vf9+Xp4MQ@mail.gmail.com>
2014-03-06 21:20                     ` Janus Weil [this message]
2014-03-06 21:55                       ` Janus Weil

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=CAKwh3qgaPTDY7cmXGkegtkthMYR4SbBTXwy5CiAn5+AysqJA_g@mail.gmail.com \
    --to=janus@gcc.gnu.org \
    --cc=burnus@net-b.de \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=mikael.morin@sfr.fr \
    --cc=paul.richard.thomas@gmail.com \
    /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).