GNU Fortran 95 (GCC 4.1.0 20050702 (experimental)) Windows XP under MINGW32_NT-5.1 1.0.10(0.46/3/2) 2004-03-15 07:17 i686 unknown
Did not build compiler, using version from GCC site downloaded from http://quatramaran.ens.fr/~coudert/gfortran/gfortran-windows.zip gfortran -c -Wsurprising -pedantic -Wall -std=f95 alloctest.f90 gfortran -v -save-temps -c -Wsurprising -pedantic -Wall -std=f95 alloctest.f90 Using built-in specs. Target: i686-pc-mingw32 Configured with: ../gcc/configure --prefix=/mingw --enable-languages=c,f95 Thread model: win32 gcc version 4.1.0 20050702 (experimental) c:/gfortran/bin/../libexec/gcc/i686-pc-mingw32/4.1.0/f951.exe alloctest.f90 -quiet -dumpbase alloctest.f90 -mtune=pentiumpro -auxbase alloctest -Wsurprising -pedantic -Wall -std=f95 -version -o alloctest.s GNU F95 version 4.1.0 20050702 (experimental) (i686-pc-mingw32) compiled by GNU C version 3.4.4 (mingw special). GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 alloctest.f90: In function 'charn_inc_alloc': alloctest.f90:89: internal compiler error: in gfc_trans_deferred_array, at fortran/trans-array.c:4009 Problem source follows: module alloctest_module implicit none public :: my_realloc_ptr public :: charn_inc_alloc interface my_realloc_ptr module procedure char_my_realloc_ptrn module procedure char_my_realloc_ptr24 end interface contains !============================ CHAR_MY_REALLOC_PTRN ============================= ! ! Reallocate space for n-character arrays ! !=============================================================================== subroutine char_my_realloc_ptrn(x,n,dim1) integer, intent(in) :: dim1, n character(len=n), dimension(:), pointer :: x integer :: status, old_dim1, i character(len=n), dimension(:), pointer :: y ! ! allocate the final array with the new dimensions ! ! if (dim1 <= 0) write(*,*)'Warning: dim1 <= 0 (c_reall_n)' allocate (y(max(1,dim1)),stat=status) if (status /= 0) stop "Allocation failed" ! ! Initialize y, then copy the old values ! old_dim1 = size(x,1) i = min0(dim1,old_dim1) y = " " y(1:i) = x(1:i) x => y ! reassign the x pointer end subroutine char_my_realloc_ptrn !============================ CHAR_MY_ALLOC_PTR24=============================== ! ! Allocate space for 24 character arrays ! !=============================================================================== subroutine char_my_realloc_ptr24(x,dim1) character(len=24), dimension(:), pointer :: x integer, intent(in) :: dim1 integer :: status, old_dim1, i character(len=24), dimension(:), pointer :: y ! ! allocate the final array with the new dimensions ! ! if (dim1 <= 0) write(*,*)'Warning: dim1 <= 0 (c_reall_24)' allocate (y(max(1,dim1)),stat=status) if (status /= 0) stop "Allocation failed" ! ! Initialize y, then copy the old values ! old_dim1 = size(x,1) i = min0(dim1,old_dim1) y = " " y(1:i) = x(1:i) x => y ! reassign the x pointer end subroutine char_my_realloc_ptr24 !===================== CHARN_INC_ALLOC========================================== ! ! Increment allocation by 1 for rank 1 character(n) arrays ! !=============================================================================== subroutine charn_inc_alloc(char1,n,length) integer, intent(in) :: n, length character(len=n), dimension(:), pointer :: char1 call my_realloc_ptr(char1,n,length+1) end subroutine charn_inc_alloc end module alloctest_module -- Summary: gfc_trans_deferred_array internal compiler error Product: gcc Version: 4.1.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: w dot t dot jones at larc dot nasa dot gov CC: gcc-bugs at gcc dot gnu dot org GCC host triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23124