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/105230] New: [9/10/11/12 Regression] ICE in find_array_section, at fortran/expr.cc:1634
Date: Mon, 11 Apr 2022 16:57:28 +0000	[thread overview]
Message-ID: <bug-105230-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 105230
           Summary: [9/10/11/12 Regression] ICE in find_array_section, at
                    fortran/expr.cc:1634
           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: ---

Started with r8 :


$ cat z1.f90
program p
   integer, parameter :: a(:) = [1, 2]
   print *, reshape([3, 4], a(1:2))
end


$ cat z2.f90
program p
   integer, parameter :: a(:) = [1, 2]
   print *, reshape(a, a(1:2))
end


$ cat z3.f90
program p
   integer, parameter :: a(:) = [1, 2]
   print *, reshape(a(1:2), a(1:2))
end


$ gfortran-12-20220410 -c z1.f90
z1.f90:2:29:

    2 |    integer, parameter :: a(:) = [1, 2]
      |                             1
Error: Parameter array 'a' at (1) cannot be automatic or of deferred shape
f951: internal compiler error: Segmentation fault
0xe7751f crash_signal
        ../../gcc/toplev.cc:322
0x736956 find_array_section
        ../../gcc/fortran/expr.cc:1634
0x73868a simplify_const_ref
        ../../gcc/fortran/expr.cc:1934
0x7391be gfc_simplify_expr(gfc_expr*, int)
        ../../gcc/fortran/expr.cc:2325
0x73942b simplify_parameter_variable
        ../../gcc/fortran/expr.cc:2154
0x739155 gfc_simplify_expr(gfc_expr*, int)
        ../../gcc/fortran/expr.cc:2292
0x70a47d gfc_check_reshape(gfc_expr*, gfc_expr*, gfc_expr*, gfc_expr*)
        ../../gcc/fortran/check.cc:4723
0x74b359 do_check
        ../../gcc/fortran/intrinsic.cc:4792
0x74b359 check_specific
        ../../gcc/fortran/intrinsic.cc:4805
0x7533e4 gfc_intrinsic_func_interface(gfc_expr*, int)
        ../../gcc/fortran/intrinsic.cc:5042
0x7a7cf8 resolve_unknown_f
        ../../gcc/fortran/resolve.cc:2990
0x7a7cf8 resolve_function
        ../../gcc/fortran/resolve.cc:3347
0x7a7cf8 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7187
0x7adeb4 gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7154
0x7adeb4 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:11949
0x7aca8f gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:10965
0x7acde8 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:11939
0x7afac7 resolve_codes
        ../../gcc/fortran/resolve.cc:17567
0x7afb8e gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.cc:17602
0x797b14 resolve_all_program_units
        ../../gcc/fortran/parse.cc:6604

             reply	other threads:[~2022-04-11 16:57 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11 16:57 gscfq@t-online.de [this message]
2022-04-11 17:47 ` [Bug fortran/105230] " kargl at gcc dot gnu.org
2022-04-12  7:43 ` rguenth at gcc dot gnu.org
2022-05-10 19:02 ` [Bug fortran/105230] [9/10/11/12/13 " anlauf at gcc dot gnu.org
2022-05-11 17:44 ` cvs-commit at gcc dot gnu.org
2022-05-13 19:35 ` cvs-commit at gcc dot gnu.org
2022-05-16 19:11 ` cvs-commit at gcc dot gnu.org
2022-05-16 19:40 ` cvs-commit at gcc dot gnu.org
2022-05-16 20:05 ` cvs-commit at gcc dot gnu.org
2022-05-16 20:07 ` 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-105230-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).