public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janus Weil <janus@gcc.gnu.org>
To: Tobias Burnus <burnus@net-b.de>
Cc: "Tobias Schlüter" <tobias.schlueter@physik.uni-muenchen.de>,
	"Dominique Dhumieres" <dominiq@lps.ens.fr>,
	fortran <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>,
	tkoenig <tkoenig@netcologne.de>
Subject: Re: [Patch, Fortran, OOP] PR 46313: OOP-ABI issue, ALLOCATE issue, CLASS renaming issue
Date: Sun, 07 Nov 2010 14:27:00 -0000	[thread overview]
Message-ID: <AANLkTimj5u_+hH1QvHSvoV9rABoB4NG3K9Qt85ww5M_b@mail.gmail.com> (raw)
In-Reply-To: <4CD6A751.6090807@net-b.de>

>>> The best option I can currently see is to use leading underscores (as
>>> in "_vtab_main_dt"). This is forbidden in Fortran (cf. F08:R303), but
>>> accepted by the assembler (cf.
>>>
>>> http://sourceware.org/binutils/docs-2.20/as/Symbol-Names.html#Symbol-Names).
>>>
>>> Attached is a patch which does this change. I also added a few macros
>>> in gfortran.h. Ok for trunk after successful regtest?
>
> +static void
> +get_unique_type_string (char *string, gfc_symbol *derived)
> +{
> +  if (derived->module)
> +    sprintf (string, "%s_%s", derived->module, derived->name);
> +  else
> +    sprintf (string, "%s_%s", derived->ns->proc_name->name, derived->name);
> +}
>
> I wonder whether that works for cases like:
>
> * module name == procedure name
> * internal procedures == procedure name / module name.
> * Nested submodules (when implemented)
>
> I assume defining the same-named (and disjunct) DT in a module and
> separately in a subroutine is weird; with internal procedures and submodules
> it will start to get crazy. But shouldn't one do something like
> _proc_<procedure_name> for procedures? A {module/procedure
> name}_internal-proc-name?
>
> Alternatively, one can defer it until a real-world bug report comes (which I
> think is very unlikely).

I also think it's unlikely. And in fact we have enough real-world PRs
to deal with right now, so I would prefer to defer this to some point
in late stage 3 when we have fixed all the worst bugs and start to get
bored ;)

The last patch I sent (leading underscore version) regtested fine btw.
Is it ok if I commit it now and leave the PR open for the corner
cases?

Cheers,
Janus

  reply	other threads:[~2010-11-07 14:21 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-06 23:40 Dominique Dhumieres
2010-11-07  0:46 ` Janus Weil
2010-11-07  8:30   ` Tobias Burnus
2010-11-07 12:05     ` Janus Weil
2010-11-07 12:33       ` Tobias Schlüter
2010-11-07 13:27         ` Tobias Burnus
2010-11-07 14:27           ` Janus Weil [this message]
2010-11-07 15:50           ` Tobias Schlüter
2010-11-07 15:51             ` Janus Weil
2010-11-07 16:52               ` Tobias Schlüter
2010-11-07 16:39       ` Steve Kargl
  -- strict thread matches above, loose matches on Subject: below --
2010-11-06 20:20 Janus Weil
2010-11-06 21:10 ` Thomas Koenig
2010-11-06 21:25   ` Janus Weil
2010-11-07 17:00 ` Tobias Burnus
2010-11-07 18:58   ` Janus Weil
2010-11-08 14:13     ` Tobias Burnus
2010-11-09 10:43       ` Janus Weil
2018-09-17  9:05         ` Bernhard Reutner-Fischer
2018-09-17 19:25           ` Janus Weil
2018-09-17 20:33             ` Janus Weil
2018-09-19 14:51               ` Bernhard Reutner-Fischer
2018-09-20 19:38                 ` 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=AANLkTimj5u_+hH1QvHSvoV9rABoB4NG3K9Qt85ww5M_b@mail.gmail.com \
    --to=janus@gcc.gnu.org \
    --cc=burnus@net-b.de \
    --cc=dominiq@lps.ens.fr \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=tkoenig@netcologne.de \
    --cc=tobias.schlueter@physik.uni-muenchen.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).