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

            Bug ID: 125608
           Summary: ICE in polymorphic assignment to array com
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: townsend at astro dot wisc.edu
  Target Milestone: ---

The following code triggers an ICE on aarch64 and x86-64:

--
program test_poly_assign

   implicit none

   type :: foo_t
   end type foo_t

   type :: bar_t
      class(foo_t), allocatable :: foo
   end type bar_t

   type(foo_t)               :: foo
   class(bar_t), allocatable :: bar(:)

   allocate(bar(1))
   bar(1)%foo = foo

end program test_poly_assign
--

Compiling with gfortran -c test_poly_assign.f90 on x86-64 gives

test_poly_assign.f90:16:19:

   16 |    bar(1)%foo = foo
      |                   1
internal compiler error: in gfc_get_descriptor_field, at
fortran/trans-array.cc:248
0x76801422a1c9 __libc_start_call_main
        ../sysdeps/nptl/libc_start_call_main.h:58
0x76801422a28a __libc_start_main_impl
        ../csu/libc-start.c:360
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

This may be related to 110877.
  • [Bug fortran/125608] New: ICE ... townsend at astro dot wisc.edu via Gcc-bugs

Reply via email to