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

Jerry DeLisle <jvdelisle at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jvdelisle at gcc dot gnu.org

--- Comment #5 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
(In reply to Tobias Burnus from comment #4)
> Related issue but without an ICE:
> 
>    contains
>       integer function f1()
>         !f2 = 1   ! gives an error as expected
>         j = f2    ! <<<< accepted; cast of function addr to integer(kind=4)
>         f1 = 1    ! ↑ ifort: 'already been used as an external function name'
>       end function
>       integer function f2()
>         f2=1
>       end function
>    end

A variation with a question:

program p1
  implicit none
  integer j, k
  j = 99
  k = f1()
  print *, j, k
contains  
  integer function f1()
    !f2 = 1
    j = f2  ! Should this be warned or rejected?
    print *, j
    f1 = 1  ! This should not be rejected
  end function
  integer function f2()
    f2=1
  end function
end

Reply via email to