public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "anlauf at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/110658] MINVAL/MAXVAL and deferred-length character arrays
Date: Sun, 16 Jul 2023 19:34:30 +0000	[thread overview]
Message-ID: <bug-110658-4-ahTFuMI6wj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-110658-4@http.gcc.gnu.org/bugzilla/>

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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |anlauf at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-07-16
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from anlauf at gcc dot gnu.org ---
I am testing the following patch:

diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc
index dbb04f8c434..e783dbb64b1 100644
--- a/gcc/fortran/trans-expr.cc
+++ b/gcc/fortran/trans-expr.cc
@@ -7654,7 +7654,12 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym,
             (and other intrinsics?) and dummy functions.  In the case of
SPREAD,
             we take the character length of the first argument for the result.
             For dummies, we have to look through the formal argument list for
-            this function and use the character length found there.*/
+            this function and use the character length found there.
+            Likewise, we handle the case of deferred-length character dummy
+            arguments to intrinsics that determine the characteristics of
+            the result, which cannot be deferred-length.  */
+         if (expr->value.function.isym)
+           ts.deferred = false;
          if (ts.deferred)
            cl.backend_decl = gfc_create_var (gfc_charlen_type_node, "slen");
          else if (!sym->attr.dummy)

  reply	other threads:[~2023-07-16 19:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13 18:26 [Bug fortran/110658] New: " anlauf at gcc dot gnu.org
2023-07-16 19:34 ` anlauf at gcc dot gnu.org [this message]
2023-07-16 20:31 ` [Bug fortran/110658] " anlauf at gcc dot gnu.org
2023-07-17 18:49 ` cvs-commit at gcc dot gnu.org
2023-07-18 18:40 ` cvs-commit at gcc dot gnu.org
2023-07-20 18:56 ` cvs-commit at gcc dot gnu.org
2023-07-20 19:06 ` cvs-commit at gcc dot gnu.org
2023-07-20 19:06 ` anlauf at gcc dot gnu.org

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=bug-110658-4-ahTFuMI6wj@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /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).