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

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2024-12-03
                 CC|                            |anlauf at gcc dot gnu.org
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from anlauf at gcc dot gnu.org ---
Confirmed.  This looks like the tip of a hornet's nest.

A possibly related smaller testcase (w/o type nesting):

program p
  implicit none
  type ty
     complex :: cmp1(2)
  end type ty
  type(ty), parameter :: obj1 = ty([(2.,3.),(4.,5.)])
  print *, obj1%cmp1(:)%re  ! wrong output
! print *, obj1%cmp1%re     ! ICE / inquiry ref (%re) not properly resolved
end

This prints here:

             (2.00000000,3.00000000)             (4.00000000,5.00000000)       
     (4.00000000,5.00000000)   (1.444458457E-41,2.295747274E-41)

Setting a breakpoint in gfc_trans_transfer, it looks like the argument
passed to print is not simplified, although it could have been, and is
then misinterpreted.  (The ICE'ing case is resolved differently, but why?)

Reply via email to