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

            Bug ID: 103782
           Summary: internal error occurs when overloading intrinsic
           Product: gcc
           Version: 10.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: urbanjost at comcast dot net
  Target Milestone: ---

program runtest
implicit none
! 
! if overload an intrinsic like dble or real this fails
!
!   internal compiler error: in gfc_trans_array_constructor_subarray, at
fortran/trans-array.c:1876
!   Please submit a full bug report,
!   with preprocessed source if appropriate.
!
! if change name DBLE to SOMETHING it works
!
! works with nvfortran(1) and ifort(1)

interface dble;    procedure to_double;  end interface

write(*,*)dble([10.0d0,20.0d0]) - [10.0d0,20.0d0]
contains

elemental function to_double(valuein) result(d_out)
doubleprecision,intent(in) :: valuein
doubleprecision            :: d_out
    d_out=valuein
end function to_double

end program runtest

Reply via email to