From comp.lang.fortran, by harper@mcs.vuw.ac.nz (John Harper). $ cat char-digits.f90 IMPLICIT NONE INTEGER,PARAMETER ::count=10 CHARACTER,PARAMETER::digits*(count+1) = '01234567890' INTEGER i CHARACTER,PARAMETER:: chardummy(0:count)*2 = & (/ (digits(i/10+1:i/10+1)//digits(i+1:i+1),i=0,count) /) write(*,*) (' ',chardummy(i),i=0,count) END $ gfortran char-digits.f90 char-digits.f90: In function 'MAIN__': char-digits.f90:7: internal compiler error: in gfc_conv_array_initializer, at fortran/trans-array.c:2938 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. $ gfortran -v Using built-in specs. Configured with: ../gcc/configure --prefix=/home/ig25 --enable-languages=c,c++,f95 Thread model: posix gcc version 4.0.0 20050103 (experimental) $ gfortran -dumpmachine i686-pc-linux-gnu
Confirmed, related to PR 18769
Fixed for 4.0.0.
Woops must have used the wrong file to test with.
Fixed in 4.1.0.
Not fixed in 4.0: $ cat > pr19282.f90 IMPLICIT NONE INTEGER,PARAMETER ::count=10 CHARACTER,PARAMETER::digits*(count+1) = '01234567890' INTEGER i CHARACTER,PARAMETER:: chardummy(0:count)*2 = & (/ (digits(i/10+1:i/10+1)//digits(i+1:i+1),i=0,count) /) write(*,*) (' ',chardummy(i),i=0,count) END $ gfortran pr19282.f90 pr19282.f90:0: internal compiler error: in gfc_set_constant_character_len, at fortran/decl.c:664 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://gcc.gnu.org/bugs.html> for instructions. $ gfortran -v Using built-in specs. Target: i686-pc-linux-gnu Configured with: ../gcc-4.0/configure --prefix=/home/ig25 --enable-languages=c,fortran Thread model: posix gcc version 4.0.2 20050917 (prerelease)
All of these are fixed in 4.1.0. Since 4.0.2 is the last 4.0 release before a 4.1.0 release will be made, 4.0.2 and 4.0.1 were special releases for gfrotran. 4.0.3 should be a normal release for GCC and gfortran in that regressions are the only changes.