public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/105633] New: ICE in find_array_section, at fortran/expr.cc:1582
@ 2022-05-17 18:44 gscfq@t-online.de
  2022-05-17 19:12 ` [Bug fortran/105633] " kargl at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: gscfq@t-online.de @ 2022-05-17 18:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105633
           Summary: ICE in find_array_section, at fortran/expr.cc:1582
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :
(follow-up of pr105230)


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


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


$ gfortran-13-20220515 -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
0xe7b33f crash_signal
        ../../gcc/toplev.cc:322
0x73877d find_array_section
        ../../gcc/fortran/expr.cc:1582
0x739f0a simplify_const_ref
        ../../gcc/fortran/expr.cc:1934
0x73aa3e gfc_simplify_expr(gfc_expr*, int)
        ../../gcc/fortran/expr.cc:2325
0x73acab simplify_parameter_variable
        ../../gcc/fortran/expr.cc:2154
0x73a9d5 gfc_simplify_expr(gfc_expr*, int)
        ../../gcc/fortran/expr.cc:2292
0x701228 expand_constructor
        ../../gcc/fortran/array.cc:1827
0x703517 gfc_array_size(gfc_expr*, __mpz_struct (*) [1])
        ../../gcc/fortran/array.cc:2677
0x7a61df expression_shape
        ../../gcc/fortran/resolve.cc:5519
0x7a61df gfc_expression_rank(gfc_expr*)
        ../../gcc/fortran/resolve.cc:5593
0x7a7aaf gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7223
0x7afb9c gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7154
0x7afb9c gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:11966
0x7ae62f gfc_resolve_blocks(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:10965
0x7ae988 gfc_resolve_code(gfc_code*, gfc_namespace*)
        ../../gcc/fortran/resolve.cc:11956
0x7b1717 resolve_codes
        ../../gcc/fortran/resolve.cc:17602
0x7b17de gfc_resolve(gfc_namespace*)
        ../../gcc/fortran/resolve.cc:17637
0x799664 resolve_all_program_units
        ../../gcc/fortran/parse.cc:6604
0x799664 gfc_parse_file()
        ../../gcc/fortran/parse.cc:6860
0x7e7eef gfc_be_parse_file
        ../../gcc/fortran/f95-lang.cc:216

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-10-23 20:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-17 18:44 [Bug fortran/105633] New: ICE in find_array_section, at fortran/expr.cc:1582 gscfq@t-online.de
2022-05-17 19:12 ` [Bug fortran/105633] " kargl at gcc dot gnu.org
2022-10-19 20:16 ` anlauf at gcc dot gnu.org
2022-10-19 20:50 ` anlauf at gcc dot gnu.org
2022-10-20 20:20 ` cvs-commit at gcc dot gnu.org
2022-10-20 20:23 ` anlauf at gcc dot gnu.org
2022-10-23 19:56 ` cvs-commit at gcc dot gnu.org
2022-10-23 19:59 ` cvs-commit at gcc dot gnu.org
2022-10-23 20:17 ` cvs-commit at gcc dot gnu.org

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