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/66493] ICE on alternate return argument for typebound procedure


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

kargl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu.org
           Assignee|unassigned at gcc dot gnu.org      |kargl at gcc dot gnu.org

--- Comment #2 from kargl at gcc dot gnu.org ---
I have a patch.  Just need to come up with a complete test.
With my patch the following runs to completion:

program foo
   integer :: cnt = 0
1  call bar(*10, *20)
   cnt = cnt + 1
   goto 30
10 cnt = cnt + 1
   if (cnt /= 3) call abort
   stop
20 cnt = cnt + 1
30 goto 1
end program foo

subroutine bar(*, *)
   implicit none
   integer, save :: i = 0
   if (i < 0) return 1
   if (i > 0) then
      i = -i
      return 2
   end if
   i = i + 1
end subroutine bar

Having never used type bound procedure, it may take a bit to convert this
into a testcase.


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