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: "gerhard dot steinmetz dot fortran at t-online dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 11 Jun 2015 08:05:51 +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
--- Comment #7 from Gerhard Steinmetz <gerhard.steinmetz.fortran@t-online.de> ---
Interestingly, there are some tests in the test suite already,
especially altreturn_3.f90 and altreturn_8.f90.
The latter is using a nopass attribute and compiles.
It still should be tested with some real runtime tests, as yours.
Some of the following constructed tests fail to compile.
$ cat zarc1_1.f90
module m
implicit none
type t
contains
procedure :: s1
procedure :: s2
generic :: s => s1, s2
end type
contains
subroutine s1(*)
end
subroutine s2(*, *)
end
end module
$ cat zarc1_2_pass.f90
module m
implicit none
type t
contains
procedure, pass :: s1
procedure, pass :: s2
generic :: s => s1, s2
end type
contains
subroutine s1(*)
end
subroutine s2(*, *)
end
end module
$ cat zarc1_3_nopass.f90
module m
implicit none
type t
contains
procedure, nopass :: s1
procedure, nopass :: s2
generic :: s => s1, s2
end type
contains
subroutine s1(*)
end
subroutine s2(*, *)
end
end module
$ cat zarcg_1.f90
module m
implicit none
type t
contains
procedure :: s1
procedure :: s2
procedure :: s3
generic :: s => s1, s2, s3
end type
contains
subroutine s1(x)
class(t) :: x
end
subroutine s2(x, *)
class(t) :: x
end
subroutine s3(x, *, *)
class(t) :: x
end
end module
$ cat zarcg_2_pass.f90
module m
implicit none
type t
contains
procedure, pass :: s1
procedure, pass :: s2
procedure, pass :: s3
generic :: s => s1, s2, s3
end type
contains
subroutine s1(x)
class(t) :: x
end
subroutine s2(x, *)
class(t) :: x
end
subroutine s3(x, *, *)
class(t) :: x
end
end module
$ cat zarcg_3_nopass.f90
module m
implicit none
type t
contains
procedure, nopass :: s1
procedure, nopass :: s2
procedure, nopass :: s3
generic :: s => s1, s2, s3
end type
contains
subroutine s1(x)
class(t) :: x
end
subroutine s2(x, *)
class(t) :: x
end
subroutine s3(x, *, *)
class(t) :: x
end
end module