------- Comment #2 from mikael dot morin at tele2 dot fr  2007-06-02 00:06 
-------
Here is an other test case. 

      program testCode
      implicit none 
      type vec
              real, dimension(3) :: coords
      end type
      integer, parameter :: n = 5
      integer :: i
      real, dimension(3, n), parameter :: vy =
     &  reshape( (/ (1.d0, i=1,3*n) /), shape = (/ 3, n /))

      i = 1
      call Sub(vec(vy(:,i)))

      contains

      subroutine Sub(xin)
      type(vec)       :: xin
      intent(in)  xin

      print*, xin

      end subroutine
      end program


This program produce an ICE (in gfc_trans_call, at fortran/trans-stmt.c:321)

But if vy is a normal variable (not a parameter), it works.
And it works also if we use vy(:,1) instead of vy(:,i). 

Hoping it helps... 


-- 

mikael dot morin at tele2 dot fr changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mikael dot morin at tele2
                   |                            |dot fr


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

Reply via email to