public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/103283] New: ICE in gfc_trans_array_constructor_subarray, at fortran/trans-array.c:1972
@ 2021-11-16 18:33 gscfq@t-online.de
  2021-11-16 18:34 ` [Bug fortran/103283] " gscfq@t-online.de
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: gscfq@t-online.de @ 2021-11-16 18:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103283
           Summary: ICE in gfc_trans_array_constructor_subarray, at
                    fortran/trans-array.c:1972
           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
   type t
      integer :: a(1) = 2
   end type
   type(t), parameter :: x(1) = [t(3)]
   integer :: y(1)
   y = [(x(1)%a)]
   print *, y(1)
end


$ cat z2.f90
program p
   type t
      integer :: a(1) = 2
   end type
   type(t), parameter :: x(1) = [t(3)]
   associate (y => [(x(1)%a)])
      print *, y(1)
   end associate
end


$ gfortran-12-20211114 -c z1.f90
z1.f90:7:17:

    7 |    y = [(x(1)%a)]
      |                 1
internal compiler error: in gfc_trans_array_constructor_subarray, at
fortran/trans-array.c:1972
0x85c45d gfc_trans_array_constructor_subarray
        ../../gcc/fortran/trans-array.c:1972
0x85c45d gfc_trans_array_constructor_value
        ../../gcc/fortran/trans-array.c:2100
0x85cdaa trans_array_constructor
        ../../gcc/fortran/trans-array.c:2900
0x85cdaa gfc_add_loop_ss_code
        ../../gcc/fortran/trans-array.c:3180
0x85d475 gfc_conv_loop_setup(gfc_loopinfo*, locus*)
        ../../gcc/fortran/trans-array.c:5430
0x890fad gfc_trans_assignment_1
        ../../gcc/fortran/trans-expr.c:11642
0x84ed67 trans_code
        ../../gcc/fortran/trans.c:1916
0x87801e gfc_generate_function_code(gfc_namespace*)
        ../../gcc/fortran/trans-decl.c:7644
0x7fb32e translate_all_program_units
        ../../gcc/fortran/parse.c:6638
0x7fb32e gfc_parse_file()
        ../../gcc/fortran/parse.c:6925
0x84806f gfc_be_parse_file
        ../../gcc/fortran/f95-lang.c:216

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

end of thread, other threads:[~2021-12-04 21:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 18:33 [Bug fortran/103283] New: ICE in gfc_trans_array_constructor_subarray, at fortran/trans-array.c:1972 gscfq@t-online.de
2021-11-16 18:34 ` [Bug fortran/103283] " gscfq@t-online.de
2021-11-30 21:34 ` anlauf at gcc dot gnu.org
2021-11-30 21:41 ` anlauf at gcc dot gnu.org
2021-12-03 21:22 ` anlauf at gcc dot gnu.org
2021-12-04 21:07 ` 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).