public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/49562] New: [OOP] ICE at invalid code: assigning value to function of polymorphic object
@ 2011-06-28  8:26 boschmann at tp1 dot physik.uni-siegen.de
  2011-06-28  9:43 ` [Bug fortran/49562] [4.6/4.7 Regression] " janus at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: boschmann at tp1 dot physik.uni-siegen.de @ 2011-06-28  8:26 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-07-10 11:53 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-28  8:26 [Bug fortran/49562] New: [OOP] ICE at invalid code: assigning value to function of polymorphic object boschmann at tp1 dot physik.uni-siegen.de
2011-06-28  9:43 ` [Bug fortran/49562] [4.6/4.7 Regression] " janus at gcc dot gnu.org
2011-06-28 11:05 ` janus at gcc dot gnu.org
2011-06-28 11:06 ` janus at gcc dot gnu.org
2011-06-28 11:19 ` janus at gcc dot gnu.org
2011-06-28 12:53 ` [Bug fortran/49562] [4.6/4.7 Regression] [OOP] assigning value to type-bound function janus at gcc dot gnu.org
2011-06-28 12:59 ` janus at gcc dot gnu.org
2011-07-02 11:09 ` janus at gcc dot gnu.org
2011-07-09 18:38 ` burnus at gcc dot gnu.org
2011-07-10  9:32 ` janus at gcc dot gnu.org
2011-07-10 11:50 ` janus at gcc dot gnu.org
2011-07-10 11:53 ` janus at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).