Bug 19282 - [4.0 only] ICE in gfc_conv_array_initializer
Summary: [4.0 only] ICE in gfc_conv_array_initializer
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: fortran (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on: 18769 25631
Blocks:
  Show dependency treegraph
 
Reported: 2005-01-05 22:04 UTC by Thomas Koenig
Modified: 2006-01-02 06:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 4.1.0
Known to fail: 4.0.2
Last reconfirmed: 2005-06-06 00:31:39


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Koenig 2005-01-05 22:04:24 UTC
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
Comment 1 Andrew Pinski 2005-01-05 22:14:06 UTC
Confirmed, related to PR 18769
Comment 2 Andrew Pinski 2005-05-01 14:20:38 UTC
Fixed for 4.0.0.
Comment 3 Andrew Pinski 2005-05-01 15:20:52 UTC
Woops must have used the wrong file to test with.
Comment 4 Andrew Pinski 2005-09-18 05:30:04 UTC
Fixed in 4.1.0.
Comment 5 Thomas Koenig 2005-09-18 15:44:03 UTC
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)
Comment 6 Andrew Pinski 2005-09-18 20:27:20 UTC
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.