ICE on PR20541 - allocatable components of derived types (TR15581)

Paul Thomas paulthomas2@wanadoo.fr
Mon Jul 17 22:16:00 GMT 2006


Salvatore,

This one is a problem that pertains to gfortran as it stands; ie. it has 
nothing to do with alloctable components.  Please submit a PR on it.

Thanks

Paul

>1st ICE example attached (probably not minimal, but manageable)
>
>[sfilippo@localhost ALLOCATABLE]$ gfortran -v
>Using built-in specs.
>Target: i686-pc-linux-gnu
>Configured with: ../gcc-4.2-20060715/configure --prefix=/usr/local/gcc42
>Thread model: posix
>gcc version 4.2.0 20060715 (experimental)
>[sfilippo@localhost ALLOCATABLE]$ gfortran -O -c test_ab_1.f90 
>test_ab_1.f90: In function 'test_ab_1':
>test_ab_1.f90:39: internal compiler error: in
>gfc_conv_descriptor_data_get, at fortran/trans-array.c:148
>Please submit a full bug report,
>with preprocessed source if appropriate.
>See <URL:http://gcc.gnu.org/bugs.html> for instructions.
>
>Regards
>salvatore
>
>  
>
>------------------------------------------------------------------------
>
>subroutine test_ab_1(v_in,v_out)
>  implicit none
>
>  interface reallocv
>    Subroutine reallocate1i(len,rrax,info,pad)
>      
>      ! ...Subroutine Arguments  
>      Integer,Intent(in)                 :: len
>      Integer,allocatable, intent(inout) :: rrax(:)
>      integer         :: info
>      integer, optional, intent(in) :: pad
>    End Subroutine reallocate1i
>  end interface
>
>
>  !     ...parameter arrays....      
>  integer              :: v_in(:)
>  integer, allocatable :: v_out(:)
>  !     ...local scalars...
>  integer :: i,p_item,ret,j, info
>  integer :: dim_v_out, dim
>
>  !     ...external function...
>  integer  :: find_item
>  external :: find_item
>
>
>  if (allocated(v_out)) then 
>    dim_v_out=size(v_out)
>  else
>    allocate(v_out(1))
>    v_out(1) = -1
>    dim_v_out = 1
>  endif
>  i=1
>  p_item=1
>  do while (v_in(i).ne.-1)
>
>    i=i+1
>    do j=1,v_in(i)
>      ret=find_item(v_out,p_item-2,v_in(i+j))
>      if (ret.eq.-1) then
>        v_out(p_item)=v_in(i+j)  
>        v_out(p_item+1)=2             
>        p_item=p_item+2              
>        if (p_item.gt.dim_v_out) then
>          dim_v_out=(3*size(v_out))/2+2
>          write(0,*) 'calling realloc crea_v_out',dim
>          call reallocv(dim_v_out,v_out,info)
>        endif
>      else
>        v_out(ret+1)=v_out(ret+1)+1
>      endif
>    enddo
>    i=i+2*v_in(i)+2
>  enddo
>  v_out(p_item)=-1
>
>end subroutine test_ab_1
>  
>



More information about the Fortran mailing list