public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/102708] New: Improve ''array temporary was created for argument" diagnostic
@ 2021-10-12 15:00 burnus at gcc dot gnu.org
  2021-10-14  9:49 ` [Bug fortran/102708] " burnus at gcc dot gnu.org
  2022-01-06  1:21 ` sandra at gcc dot gnu.org
  0 siblings, 2 replies; 3+ messages in thread
From: burnus at gcc dot gnu.org @ 2021-10-12 15:00 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102708

            Bug ID: 102708
           Summary: Improve ''array temporary was created for argument"
                    diagnostic
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

The message is produced by gfc_conv_subref_array_arg when called with:

      if (fsym && proc_name)
        msg = xasprintf ("An array temporary was created for argument "
                             "'%s' of procedure '%s'", fsym->name, proc_name);
      else
        msg = xasprintf ("An array temporary was created");

obviously the message is clearer when fsym + proc_name is available. However,
in gfc_conv_procedure_call those aren't passed.


Probably, it would be useful to have additionally the name of the calling
procedure, e.g.

"An array temporary was created in procedure '%s' for argument '%s' of
procedure '%s'"


Note: I also use it in my gfc_conv_gfc_desc_to_cfi_desc (submitted but
unreviewed patch); thus that one should then also have the better diagnostic.
(It already has the %s of proc %s diagnostic.)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-06  1:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-12 15:00 [Bug fortran/102708] New: Improve ''array temporary was created for argument" diagnostic burnus at gcc dot gnu.org
2021-10-14  9:49 ` [Bug fortran/102708] " burnus at gcc dot gnu.org
2022-01-06  1:21 ` sandra at gcc dot gnu.org

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).