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/49562] New: [OOP] ICE at invalid code: assigning value to function of polymorphic object


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

           Summary: [OOP] ICE at invalid code: assigning value to function
                    of polymorphic object
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: boschmann@tp1.physik.uni-siegen.de
                CC: janus@gcc.gnu.org


The code:

module ice
  type::ice_type
   contains
     procedure::ice_func
  end type ice_type
contains
  pure integer function ice_func(this)
    class(ice_type),intent(in)::this
    ice_func=1
  end function ice_func
  subroutine ice_sub(a)
    class(ice_type)::a
    a%ice_func()=1           ! This is the invalid line
  end subroutine ice_sub
end module ice

The marked line is obviously not allowed. When I replace class(ice_type)::a by
type(ice_type)::a then get a proper error message, but the class statement
results in an internal compiler error.

My gfortran version is 4.7.0 20110620


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