public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "kargl at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/95543] [PDT] ICE in is_CFI_desc, at fortran/expr.c:1080
Date: Sat, 06 Jun 2020 16:34:53 +0000	[thread overview]
Message-ID: <bug-95543-4-yy3ndLo0C1@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95543-4@http.gcc.gnu.org/bugzilla/>

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |wrong-code

--- Comment #2 from kargl at gcc dot gnu.org ---
This cures the ICE, which then I believe leads to wrong-code.

Index: gcc/fortran/trans-decl.c
===================================================================
--- gcc/fortran/trans-decl.c    (revision 280157)
+++ gcc/fortran/trans-decl.c    (working copy)
@@ -708,7 +708,7 @@ gfc_finish_var_decl (tree decl, gfc_symbol * sym)
      are SAVE_NONE but have an initializer.  Otherwise explicitly
      initialized variables are SAVE_IMPLICIT and explicitly saved are
      SAVE_EXPLICIT.  */
-  if (!sym->attr.use_assoc
+  if (!sym->attr.use_assoc && !sym->attr.pdt_kind && !sym->attr.pdt_len
        && (sym->attr.save != SAVE_NONE || sym->attr.data
            || (sym->value && sym->ns->proc_name->attr.is_main_program)
            || (flag_coarray == GFC_FCOARRAY_LIB
@@ -1554,7 +1554,9 @@ gfc_get_symbol_decl (gfc_symbol * sym)

   fun_or_res = byref && (sym->attr.result
                         || (sym->attr.function && sym->ts.deferred));
-  if ((sym->attr.dummy && ! sym->attr.function) || fun_or_res)
+  if (((sym->attr.dummy && !sym->attr.function)
+       && !(sym->attr.pdt_kind || sym->attr.pdt_len))
+      || fun_or_res)
     {
       /* Return via extra parameter.  */
       if (sym->attr.result && byref

  parent reply	other threads:[~2020-06-06 16:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-04 18:15 [Bug fortran/95543] New: " gscfq@t-online.de
2020-06-06 16:08 ` [Bug fortran/95543] [PDT] " kargl at gcc dot gnu.org
2020-06-06 16:34 ` kargl at gcc dot gnu.org [this message]
2020-06-06 17:13 ` sgk at troutmask dot apl.washington.edu
2020-06-06 17:32 ` sgk at troutmask dot apl.washington.edu
2023-06-30  8:16 ` pault 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-95543-4-yy3ndLo0C1@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).