public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <idsandoe@googlemail.com>
To: Thomas Koenig <tkoenig@netcologne.de>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>,
	Fortran List <fortran@gcc.gnu.org>
Subject: Re: [patch, fortran] Optionally improve debugging of auxiliary variables
Date: Sun, 13 Dec 2020 19:59:34 +0000	[thread overview]
Message-ID: <4E78162B-817D-4DE0-BA60-6E76CCCBF4E3@googlemail.com> (raw)
In-Reply-To: <63a95a8d-ddc9-ccd0-e698-92c2ffffa086@netcologne.de>

Hi Thomas,

Thomas Koenig via Fortran <fortran@gcc.gnu.org> wrote:

>> I guess the hard thing is for the developer to know that (s)he wants
>> the option and what to do when a conflict occurs.
>
> Actually, I just hit on a much simpler solution.

:) .. I’m all in favour of simplicity.

> We translate all symbols to lower case (except for those
> with BIND(C), which do not matter in this context).  So,
> prefixing everything with GFC_ (upper case) should work on
> any toolchain that can handle C, which is all we care about.

For bonus points you can prefix with _GFC_ which puts the symbols
in the implementation’s namespace (at least for C-Family purposes)
and therefore means that a clash with a user’s symbols is the user’s
problem …

> So, here is a patch which implements this method. The tree
> dump now looks like this:
>
>    struct __st_parameter_dt GFC_dt_parm_0;
>
>    GFC_dt_parm_0.common.filename = &"hello.f90"[1]{lb: 1 sz: 1};
>    GFC_dt_parm_0.common.line = 2;
>    GFC_dt_parm_0.common.flags = 128;
>    GFC_dt_parm_0.common.unit = 6;
>    _gfortran_st_write (&GFC_dt_parm_0);
>    _gfortran_transfer_character_write (&GFC_dt_parm_0, &"Hello, world"[1]{lb: 1 sz: 1}, 12);
>    _gfortran_st_write_done (&GFC_dt_parm_0);
>
> So, thanks for raising your concerns, I like this much better now :-)
>
> Regression-tested. Also tested with "make dvi" and "make pdf".
> If there are no other comments, I'd like to commit this as having
> no user impact and kind of obvious (now :-) tomorrow or so.
>
> Best regards
>
> 	Thomas
> <p3.diff>



  reply	other threads:[~2020-12-13 19:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-12 18:59 Thomas Koenig
2020-12-13 12:21 ` Iain Sandoe
2020-12-13 14:20   ` Thomas Koenig
2020-12-13 14:29     ` Iain Sandoe
2020-12-13 14:50       ` Thomas Koenig
2020-12-13 15:02         ` Iain Sandoe
2020-12-13 19:04           ` Thomas Koenig
2020-12-13 19:59             ` Iain Sandoe [this message]
2020-12-15 16:17               ` Thomas Koenig

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=4E78162B-817D-4DE0-BA60-6E76CCCBF4E3@googlemail.com \
    --to=idsandoe@googlemail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tkoenig@netcologne.de \
    /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).