public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Harald Anlauf <anlauf@gmx.de>
To: Rimvydas Jasinskas <rimvydasjas@gmail.com>
Cc: Rimvydas Jasinskas via Fortran <fortran@gcc.gnu.org>
Subject: Re: Support for WEAK attribute, part 2
Date: Thu, 23 Feb 2023 21:53:51 +0100	[thread overview]
Message-ID: <trinity-475912d3-f7e9-4ec9-b5c7-66d0cad9e63e-1677185631233@3c-app-gmx-bap67> (raw)
In-Reply-To: <CAFmAMQ0bzmO1bmCy_5men10qmmv2K9G6jRgSk6XnY+HW-VVtLA@mail.gmail.com>

Hi Rimvydas,

> Attached is part2 patch for weak variables support.

the patch is mostly fine, but there is a minor style issue:

+      if (sym->attr.ext_attr & (1 << EXT_ATTR_WEAK))
+	gfc_error ("Symbol %qs at %L has the WEAK attribute but is a %s",
+		   sym->name, &sym->declared_at, sym->attr.dummy
+		   ? "dummy argument" : "local variable");
+

It is my understanding that this is not translation-friendly.
Please use separate error texts for either case instead.

Do we need to really have that many separate files for all
the tests?  Note that each separate file contributes to the
time developers wait on regtesting to complete.  Some of the
files essentially test only minor variations, like weak-2.f90
and weak-3.f90.

What is the purpose of testcase weak-5.f90?  It's valid
Fortran, the common block /c/ shows in the assembler and
does not interfere with the module variable c.

If you are interested in the interaction of name mangling
and weak declarations, isn't that already done in weak-4.f90?

Also, is it possible to combine weak-6.f90 and weak-7.f90?

Finally, please do not forget to CC patches to gcc-patches@
so that others can see them.

Thanks,
Harald


  reply	other threads:[~2023-02-23 20:53 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10  5:42 Support for NOINLINE attribute Rimvydas Jasinskas
2023-02-10  8:24 ` Steve Kargl
2023-02-10  8:38   ` Rimvydas Jasinskas
2023-02-10 18:53     ` Steve Kargl
2023-02-10 21:07 ` Harald Anlauf
2023-02-10 21:16   ` Steve Kargl
2023-02-10 22:16   ` Rimvydas Jasinskas
2023-02-11 21:26     ` Harald Anlauf
2023-02-12  6:59       ` Rimvydas Jasinskas
2023-02-12 21:28         ` Harald Anlauf
2023-02-13 17:50           ` Harald Anlauf
2023-02-14  9:35             ` nvptx: Adjust 'scan-assembler' in 'gfortran.dg/weak-1.f90' (was: Support for NOINLINE attribute) Thomas Schwinge
2023-02-14 19:55               ` Harald Anlauf
2023-02-15 20:58                 ` Support for WEAK attribute, part 2 Rimvydas Jasinskas
2023-02-16 21:50                   ` Harald Anlauf
2023-02-23 13:55                     ` Rimvydas Jasinskas
2023-02-23 20:53                       ` Harald Anlauf [this message]
2023-02-24  5:16                         ` Rimvydas Jasinskas
2023-02-24 22:03                           ` Harald Anlauf
2023-03-28 21:06                           ` Enable 'gfortran.dg/weak-2.f90' for nvptx target (was: Support for WEAK attribute, part 2) Thomas Schwinge
2023-02-18 20:35 ` Support for NOINLINE attribute Bernhard Reutner-Fischer
2023-02-24  7:19   ` Bernhard Reutner-Fischer
2023-02-24 12:02     ` Rimvydas Jasinskas

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=trinity-475912d3-f7e9-4ec9-b5c7-66d0cad9e63e-1677185631233@3c-app-gmx-bap67 \
    --to=anlauf@gmx.de \
    --cc=fortran@gcc.gnu.org \
    --cc=rimvydasjas@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).