This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/46060] gfortran crash when referencing procedure pointer


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46060

janus at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2010.10.18 09:48:42
     Ever Confirmed|0                           |1

--- Comment #3 from janus at gcc dot gnu.org 2010-10-18 09:48:42 UTC ---
Confirmed. Here is a slightly reduced test case:

implicit none

abstract interface
  function name_func (ivar) result (res)
    integer, intent(in) :: ivar
    character(len=8) :: res
  end function name_func
end interface

type var_type
  procedure(name_func), nopass, pointer :: name
end type var_type

type(var_type) :: vars
character(len=8) name

name = vars%name   ! invalid !!!

end


This, like the original code, is invalid and gives an ICE. Changing the invalid
line to something like

name = vars%name(3)

makes the ICE go away.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]