This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/66493] ICE on alternate return argument for typebound procedure
- From: "kargl at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 10 Jun 2015 22:21:52 +0000
- Subject: [Bug fortran/66493] ICE on alternate return argument for typebound procedure
- Auto-submitted: auto-generated
- References: <bug-66493-4 at http dot gcc dot gnu dot org/bugzilla/>
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.