public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/47730] New: ICE as a consequence of invalid source code attempting to register a type-bound procedure
@ 2011-02-14  9:49 arjen.markus at deltares dot nl
  2011-02-14 10:24 ` [Bug fortran/47730] [OOP] ICE on invalid source in connection with SELECT TYPE janus at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: arjen.markus at deltares dot nl @ 2011-02-14  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: ICE as a consequence of invalid source code attempting
                    to register a type-bound procedure
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: arjen.markus@deltares.nl


The code below produces an ICE after reporting that assign_square must be a
module procedure or an external procedure. It seems related to bug #46849

module geometrical_objects

   implicit none

   type, abstract :: shape
   end type shape

   type, extends(shape) :: rectangle
       real :: width, height
   end type rectangle

   type, extends(rectangle) :: square
   contains
       procedure ::  assign_square
   end type square

contains

  subroutine assign_rectangle( this, that )
    class(shape),     intent(inout) :: this
    class(rectangle), intent(in)    :: that
    select type( that )
      class is (rectangle)
    end select
  end subroutine assign_rectangle

  subroutine assign_square( this, that )
    class(shape),  intent(inout) :: this
    class(square), intent(in)    :: that
  end subroutine assign_square

end module geometrical_objects


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

end of thread, other threads:[~2011-02-14 22:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-14  9:49 [Bug fortran/47730] New: ICE as a consequence of invalid source code attempting to register a type-bound procedure arjen.markus at deltares dot nl
2011-02-14 10:24 ` [Bug fortran/47730] [OOP] ICE on invalid source in connection with SELECT TYPE janus at gcc dot gnu.org
2011-02-14 10:29 ` janus at gcc dot gnu.org
2011-02-14 11:19 ` janus at gcc dot gnu.org
2011-02-14 21:07 ` janus at gcc dot gnu.org
2011-02-14 22:19 ` janus at gcc dot gnu.org
2011-02-14 22:51 ` 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).