public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/104350] New: ICE in gfc_array_dimen_size(): Bad dimension
@ 2022-02-02 18:41 gscfq@t-online.de
  2022-02-25 20:27 ` [Bug fortran/104350] " anlauf at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2022-02-02 18:41 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104350
           Summary: ICE in gfc_array_dimen_size(): Bad dimension
           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: ---

Affects versions down to at least r5 :


$ cat z1.f90
program p
   integer :: x(1) = 1
   integer :: k
   print *, product([(size(x, dim=k), k=0,rank(x))])
end


$ cat z2.f90
program p
   integer :: x(0) = 0
   integer :: k
   print *, product([(size(x, dim=k), k=0,rank(x))])
end


$ cat z3.f90
program p
   integer :: x(1) = 1
   integer :: k
   print *, product([(size(x, dim=k), k=1,2)])
end


$ cat z4.f90
program p
   integer :: x(1) = 1
   integer :: k
   print *, product([(size(x, dim=k), k=-3,3)])
end


$ gfortran-12-20220130 -c z1.f90
f951: internal compiler error: gfc_array_dimen_size(): Bad dimension
0x6ec739 gfc_report_diagnostic
        ../../gcc/fortran/error.cc:883
0x6ee2b7 gfc_internal_error(char const*, ...)
        ../../gcc/fortran/error.cc:1503
0x6bc99f gfc_array_dimen_size(gfc_expr*, int, __mpz_struct (*) [1])
        ../../gcc/fortran/array.cc:2574
0x77896f simplify_size
        ../../gcc/fortran/simplify.cc:7580
0x786995 gfc_simplify_size(gfc_expr*, gfc_expr*, gfc_expr*)
        ../../gcc/fortran/simplify.cc:7601
0x70276a do_simplify
        ../../gcc/fortran/intrinsic.cc:4676
0x70d538 gfc_intrinsic_func_interface(gfc_expr*, int)
        ../../gcc/fortran/intrinsic.cc:4941
0x6f346c gfc_simplify_expr(gfc_expr*, int)
        ../../gcc/fortran/expr.cc:2220
0x6b9e11 expand_constructor
        ../../gcc/fortran/array.cc:1827
0x6ba0be expand_expr
        ../../gcc/fortran/array.cc:1685
0x6ba0be expand_iterator
        ../../gcc/fortran/array.cc:1755
0x6ba0be expand_constructor
        ../../gcc/fortran/array.cc:1798
0x6bc1f7 gfc_array_size(gfc_expr*, __mpz_struct (*) [1])
        ../../gcc/fortran/array.cc:2665
0x75e30f expression_shape
        ../../gcc/fortran/resolve.cc:5501
0x75e30f gfc_expression_rank(gfc_expr*)
        ../../gcc/fortran/resolve.cc:5575
0x75fbdf gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7205
0x763cbf gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:2217
0x763cbf resolve_actual_arglist
        ../../gcc/fortran/resolve.cc:2136
0x75f96e resolve_function
        ../../gcc/fortran/resolve.cc:3274
0x75f96e gfc_resolve_expr(gfc_expr*)
        ../../gcc/fortran/resolve.cc:7169

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

end of thread, other threads:[~2023-05-25 17:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-02 18:41 [Bug fortran/104350] New: ICE in gfc_array_dimen_size(): Bad dimension gscfq@t-online.de
2022-02-25 20:27 ` [Bug fortran/104350] " anlauf at gcc dot gnu.org
2023-05-23 20:51 ` anlauf at gcc dot gnu.org
2023-05-24 19:16 ` anlauf at gcc dot gnu.org
2023-05-24 19:51 ` cvs-commit at gcc dot gnu.org
2023-05-25 17:14 ` anlauf 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).