public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/18568] New: pointers in derived data types do not transmit shape of pointed to arrays - bug or non-standard feature?
@ 2004-11-19 16:02 paul dot richard dot thomas at cea dot fr
  2004-11-19 18:09 ` [Bug fortran/18568] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: paul dot richard dot thomas at cea dot fr @ 2004-11-19 16:02 UTC (permalink / raw)
  To: gcc-bugs

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

= > first gfortran

THOMASP@PC-THOMAS-P /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

THOMASP@PC-THOMAS-P /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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug fortran/18568] pointers in derived data types do not transmit shape of pointed to arrays - bug or non-standard feature?
  2004-11-19 16:02 [Bug fortran/18568] New: pointers in derived data types do not transmit shape of pointed to arrays - bug or non-standard feature? paul dot richard dot thomas at cea dot fr
@ 2004-11-19 18:09 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-19 18:09 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-19 18:09 -------
Confirmed, reduced testcase:
        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 )  )
           end function foo
        END MODULE ints
        program size_test
          use ints
        end program size_test

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |ice-on-valid-code, rejects-
                   |                            |valid
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-19 18:09:19
               date|                            |


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-19 18:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-19 16:02 [Bug fortran/18568] New: pointers in derived data types do not transmit shape of pointed to arrays - bug or non-standard feature? paul dot richard dot thomas at cea dot fr
2004-11-19 18:09 ` [Bug fortran/18568] " pinskia at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).