This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault
- From: "janus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 25 Apr 2010 17:16:32 -0000
- Subject: [Bug fortran/42274] [fortran-dev Regression] ICE: segmentation fault
- References: <bug-42274-9410@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #24 from janus at gcc dot gnu dot org 2010-04-25 17:16 -------
(In reply to comment #20)
> My suspicion, which is strengthened by the remaining regressions for version 3
> of your fix, is that the generic components of the vtab should not be marked as
> ppc. I have been tempted to apply it blind but have been trying to analyse
> first :-) That does not mean that you should not give it a shot, though!
Well, in the light of today's progress I am quite optimistic that it should be
possible to have everything working with all the 'ppc' attributes in place.
Note that many cases of generic TBPs are working already. The remaining
failures seem to be related to generic TBPs with overriding.
The following is a reduced version of the runtime failure in
dynamic_dispatch_1.f03:
module m
type :: t1
integer :: i = 42
contains
procedure, pass :: make_integer
generic, public :: extract => make_integer
end type t1
type, extends(t1) :: t2
integer :: j = 99
contains
procedure, pass :: make_integer_2
generic, public :: extract => make_integer_2
end type t2
contains
integer function make_integer (arg, arg2)
class(t1), intent(in) :: arg
integer :: arg2
make_integer = arg%i * arg2
end function make_integer
integer function make_integer_2 (arg, arg2)
class(t2), intent(in) :: arg
integer :: arg2
make_integer_2 = arg%j * arg2
end function make_integer_2
end module m
use m
class(t1), pointer :: a
type(t2), target :: c
a => c
print *,a%extract(3)
if (a%extract (3) .ne. 297) call abort ! FAIL
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42274