Source given at end, after comparison of gfortran and digital fortran 

= > first gfortran

[EMAIL PROTECTED] /cygdrive/c/df
$ /gcc-4.0/bin/gfortran "d:\ITC\ITCFOR\size_test.f90"
 In file d:\ITC\ITCFOR\size_test.f90:22

 end program size_test
                     1
 Internal Error at (1):
 find_array_spec(): Component not found

=> now Digital Fortran ( Intel ifc is OK too ) 

$ ./f90 "d:\ITC\ITCFOR\size_test.f90"
DIGITAL Visual Fortran Optimizing Compiler Version 5.0 (Update D)
Copyright (C) 1997,1998 Digital Equipment Corp. All rights reserved.
/out:size_test.exe

[EMAIL PROTECTED] /cygdrive/c/df
$ ./size_test
           1           2           3           4           5           6
           7           8           9          10

=> The source

        MODULE ints
           type, PUBLIC                           ::      bar
              integer, pointer                    ::      th(:)
           end type bar
        CONTAINS
           FUNCTION foo(b)
              TYPE( bar ),INTENT(IN)              ::      b
              integer                             ::      foo( size( b%th ) )
              foo = b%th
              Return
           end function foo
        END MODULE ints 
        program size_test
          use ints
          type(bar)                               ::      a
          integer, dimension(10), target          ::      i1 , i2
          integer                                 ::      ictr
          i1 = (/( ictr , ictr =1,10)/)
          a%th => i1
          i2 = foo( a )
          print * , i2
        end program size_test

-- 
           Summary: pointers in derived data types do not transmit shape of
                    pointed to arrays - bug or non-standard feature?
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: paul dot richard dot thomas at cea dot fr
                CC: gcc-bugs at gcc dot gnu dot org,paulthomas2 at wanadoo
                    dot fr


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18568

Reply via email to