public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "gscfq@t-online.de" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/99138] New: ICE in gfc_match_rvalue, at fortran/primary.c:3738
Date: Wed, 17 Feb 2021 18:10:32 +0000	[thread overview]
Message-ID: <bug-99138-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 99138
           Summary: ICE in gfc_match_rvalue, at fortran/primary.c:3738
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

This invalid code affects versions down to r6 :
(print statement in contains section)


$ cat z1.f90
module m
   interface
      module function f(x)
         integer, intent(in) :: x
         class(*), allocatable :: f
      end
   end interface
end
submodule(m) m2
contains
   module function f(x)
      integer, intent(in) :: x
      class(*), allocatable :: f
   end
   print *, f(3)
end


$ gfortran-11-20210214 -c z1.f90
f951: internal compiler error: Segmentation fault
0xc09bcf crash_signal
        ../../gcc/toplev.c:327
0x6ec98e gfc_match_rvalue(gfc_expr**)
        ../../gcc/fortran/primary.c:3738
0x6c0eae match_primary
        ../../gcc/fortran/matchexp.c:157
0x6c0eae match_level_1
        ../../gcc/fortran/matchexp.c:211
0x6c0eae match_mult_operand
        ../../gcc/fortran/matchexp.c:267
0x6c10f8 match_add_operand
        ../../gcc/fortran/matchexp.c:356
0x6c134c match_level_2
        ../../gcc/fortran/matchexp.c:480
0x6c14a2 match_level_3
        ../../gcc/fortran/matchexp.c:551
0x6c1594 match_level_4
        ../../gcc/fortran/matchexp.c:599
0x6c1594 match_and_operand
        ../../gcc/fortran/matchexp.c:693
0x6c1782 match_or_operand
        ../../gcc/fortran/matchexp.c:722
0x6c1852 match_equiv_operand
        ../../gcc/fortran/matchexp.c:765
0x6c1924 match_level_5
        ../../gcc/fortran/matchexp.c:811
0x6c0d01 gfc_match_expr(gfc_expr**)
        ../../gcc/fortran/matchexp.c:870
0x6a8c99 match_io_element
        ../../gcc/fortran/io.c:3661
0x6ab575 match_io_list
        ../../gcc/fortran/io.c:3709
0x6ab974 match_io
        ../../gcc/fortran/io.c:4387
0x6af3fa gfc_match_print()
        ../../gcc/fortran/io.c:4443
0x6dbc21 match_word
        ../../gcc/fortran/parse.c:65
0x6e07a3 decode_statement
        ../../gcc/fortran/parse.c:537

             reply	other threads:[~2021-02-17 18:10 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-17 18:10 gscfq@t-online.de [this message]
2021-02-18  8:37 ` [Bug fortran/99138] " marxin at gcc dot gnu.org
2021-02-22 14:21 ` burnus at gcc dot gnu.org
2021-02-22 17:29 ` pault at gcc dot gnu.org
2021-02-22 18:17 ` burnus at gcc dot gnu.org
2021-02-22 23:37 ` burnus at gcc dot gnu.org
2021-03-15 21:56 ` anlauf at gcc dot gnu.org
2021-03-16 20:43 ` anlauf at gcc dot gnu.org
2021-03-16 21:32 ` 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-99138-4@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).