[Fortran-dev] Merged trunk into branch

Tobias Burnus burnus@net-b.de
Wed Sep 30 12:45:00 GMT 2009


On 09/30/2009 02:12 PM, Dominique Dhumieres wrote:
> The patch fixed the ICE and the code gives some results (I picked the code
> in http://groups.google.com/group/comp.lang.fortran/ some time ago
> -before I took the habit to keep a link to the topic). I am passing my tests
> right now.
>   
Dominique: The code is by Richard Maine,
cf.
http://coding.derkeiler.com/Archive/Fortran/comp.lang.fortran/2006-10/msg00104.html

 * * *

Janus: I tried to make a test case out of it, but it does not fully
work; I get:

          if (node%x /= 1.23) call abort()
                    1
Error: 'x' at (1) is not a member of the 'node_type' structure

but it works with the two-years-old NAG f95 v5.1.

Tobias


PS: Related but possibly different is the following:

        mt3%j = mt2%i
                     1
Error: 'i' at (1) is not a member of the 't1' structure


type t1
end type t1

type, extends(t1) :: t2
  integer :: i
end type t2

type, extends(t1) :: t3
  integer :: j
end type t3

class(t1), allocatable :: mt2, mt3
allocate(t2 :: mt2)
allocate(t3 :: mt3)

select type (mt2)
  type is(t2)
    mt2%i = 5
    select type(mt3)
      type is(t3)
        mt3%j = mt2%i
      class default
        stop 'error'
    end select
  class default
    stop 'error'
end select
end
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: poly_list.f90
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20090930/4a74cfd9/attachment.f90>


More information about the Fortran mailing list