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/95342] [9/10/11 Regression] ICE in gfc_match_subroutine, at fortran/decl.c:7913
Date: Tue, 26 May 2020 18:16:28 +0000	[thread overview]
Message-ID: <bug-95342-4-p1AIcXSDjj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-95342-4@http.gcc.gnu.org/bugzilla/>

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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
(In reply to G. Steinmetz from comment #1)
> Related :
> 
> 
> $ cat z2.f90
> module m
>    interface
>       module function f()
>       end
>    end interface
>    interface
>       function f() bind(c)
>       end
>    end interface
> end
> 
> 
> $ gfortran-11-20200524 -c z2.f90
> f951: internal compiler error: Segmentation fault
> 0xbc0f6f crash_signal
>         ../../gcc/toplev.c:328
> 0x643eeb gfc_match_function_decl()
>         ../../gcc/fortran/decl.c:7398
> 0x6a82ca decode_statement
>         ../../gcc/fortran/parse.c:343
> 0x6a9e1a next_free
>         ../../gcc/fortran/parse.c:1279
> 0x6a9e1a next_statement
>         ../../gcc/fortran/parse.c:1511
> 0x6aba5c parse_interface
>         ../../gcc/fortran/parse.c:3519
> 0x6aba5c parse_spec
>         ../../gcc/fortran/parse.c:3875
> 0x6af43e parse_module
>         ../../gcc/fortran/parse.c:6115
> 0x6af787 gfc_parse_file()
>         ../../gcc/fortran/parse.c:6428
> 0x6fb9af gfc_be_parse_file
>         ../../gcc/fortran/f95-lang.c:210

Index: gcc/fortran/decl.c
===================================================================
--- gcc/fortran/decl.c  (revision 280157)
+++ gcc/fortran/decl.c  (working copy)
@@ -7325,7 +7325,8 @@ gfc_match_function_decl (void)
      procedure interface body.  */
     if (sym->attr.is_bind_c && sym->attr.module_procedure && sym->old_symbol
        && strcmp (sym->name, sym->old_symbol->name) == 0
-       && strcmp (sym->binding_label, sym->old_symbol->binding_label) != 0)
+       && (!sym->old_symbol->binding_label
+           || strcmp (sym->binding_label, sym->old_symbol->binding_label) !=
0))
       {
          const char *null = "NULL", *s1, *s2;
          s1 = sym->binding_label;

  parent reply	other threads:[~2020-05-26 18:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-26 16:45 [Bug fortran/95342] New: " gscfq@t-online.de
2020-05-26 16:46 ` [Bug fortran/95342] " gscfq@t-online.de
2020-05-26 18:16 ` kargl at gcc dot gnu.org [this message]
2020-05-26 18:29 ` kargl at gcc dot gnu.org
2020-05-27  7:38 ` rguenth at gcc dot gnu.org
2020-06-09 10:54 ` dominiq at lps dot ens.fr
2020-11-26 21:27 ` anlauf at gcc dot gnu.org
2020-12-03 19:33 ` cvs-commit at gcc dot gnu.org
2020-12-04 22:18 ` cvs-commit at gcc dot gnu.org
2020-12-04 22:31 ` cvs-commit at gcc dot gnu.org
2020-12-04 22:33 ` 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-95342-4-p1AIcXSDjj@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).