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

            Bug ID: 111618
           Summary: ICE in associate construction
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: antoine.lemo...@bordeaux-inp.fr
  Target Milestone: ---

An ICE occurs with this code:

program prog
   implicit none
   type foo
      double precision, dimension(3) :: long_a
      double precision, dimension(3) :: long_b
   end type
   type(foo) :: the_foo
   double precision :: d
   associate(a => the_foo%long_a, b => the_foo%long_b)
      a = 2d0
      b = 1d0
      d = hypot(b(1), b(2)) ! No ICE without this line.
      b = a - b
   end associate
end program

No ICE when writing 'b = a - b(:)' or commenting out 'd = hypot(b(1), b(2))'.

Reply via email to