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/101069] New: ICE in gfc_resolve_expr, at fortran/resolve.c:7087
Date: Mon, 14 Jun 2021 17:19:37 +0000	[thread overview]
Message-ID: <bug-101069-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 101069
           Summary: ICE in gfc_resolve_expr, at fortran/resolve.c:7087
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

The ICE is always reproducible with gcc-11-20201004 and newer on
my environment, and never with gcc-11-20200823, but ICEs sometimes
sporadically for older versions too. Other brands may also stumble.


$ cat z1.f90
program p
   character(*), parameter :: x(2) = [character(n) :: 'a', 'b']
end


$ gfortran-12-20210613 -c z1.f90   # configured with --enable-checking=yes
z1.f90:2:34:

    2 |    character(*), parameter :: x(2) = [character(n) :: 'a', 'b']
      |                                  1
Error: Cannot initialize parameter array at (1) with variable length elements
f951: internal compiler error: Segmentation fault
0xe1963f crash_signal
        ../../gcc/toplev.c:327
0x798173 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:7087
0x79a9d4 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.c:12525
0x79a9d4 resolve_charlen
        ../../gcc/fortran/resolve.c:12475
0x7a6c29 resolve_charlen
        ../../gcc/fortran/resolve.c:12466
0x7a6c29 resolve_types
        ../../gcc/fortran/resolve.c:17344
0x7a227c gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.c:17461
0x78a7b4 resolve_all_program_units
        ../../gcc/fortran/parse.c:6400
0x78a7b4 gfc_parse_file()
        ../../gcc/fortran/parse.c:6652
0x7d7dcf gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:212

             reply	other threads:[~2021-06-14 17:19 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-14 17:19 gscfq@t-online.de [this message]
2021-06-14 19:03 ` [Bug fortran/101069] " anlauf at gcc dot gnu.org
2021-06-14 19:25 ` gscfq@t-online.de

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-101069-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).