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/42274] [fortran-dev Regression] ICE: segmentation fault



------- 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


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