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/107995] ICE: Segmentation fault, without backtrace
Date: Sat, 10 Dec 2022 02:19:02 +0000	[thread overview]
Message-ID: <bug-107995-4-bUOUZBpOCR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107995-4@http.gcc.gnu.org/bugzilla/>

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P4
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-12-10
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #1 from kargl at gcc dot gnu.org ---
This patch prevents the ICE.  It has been regression tested, and not regression
occurred.  AFAICT, a statement function cannot be a dummy argument.


diff --git a/gcc/fortran/interface.cc b/gcc/fortran/interface.cc
index d3e199535b3..8f9eabf0f1c 100644
--- a/gcc/fortran/interface.cc
+++ b/gcc/fortran/interface.cc
@@ -1334,6 +1334,9 @@ gfc_check_dummy_characteristics (gfc_symbol *s1,
gfc_symbol *s2,
   if (s1 == NULL || s2 == NULL)
     return s1 == s2 ? true : false;

+  if (s1->attr.proc == PROC_ST_FUNCTION || s2->attr.proc == PROC_ST_FUNCTION)
+    return false;
+
   /* Check type and rank.  */
   if (type_must_agree)
     {

  reply	other threads:[~2022-12-10  2:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-06 18:06 [Bug fortran/107995] New: " gscfq@t-online.de
2022-12-10  2:19 ` kargl at gcc dot gnu.org [this message]
2022-12-10 19:37 ` [Bug fortran/107995] " anlauf at gcc dot gnu.org
2022-12-10 21:05 ` sgk at troutmask dot apl.washington.edu
2022-12-10 21:24 ` anlauf at gcc dot gnu.org
2022-12-11 19:35 ` cvs-commit at gcc dot gnu.org
2022-12-12 20:23 ` anlauf at gcc dot gnu.org
2022-12-12 21:43 ` sgk at troutmask dot apl.washington.edu
2022-12-12 21:49 ` 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-107995-4-bUOUZBpOCR@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).