This
$ cat assign_bug_3.f90
character(1) :: a(3) = ['1','2','3']
integer :: i = 1
a(2:3)(i:i) = a(1:2)(i:i)
print *, a
end
$ /irun/bin/gfortran assign_bug_3.f90; ./a
111
is the wrong result (should be 112)
The problem lies in gfc_check_dependency, where the assumption about substrings
is wrong. Fixing this exposes an ICE in
trans-array.c(gfc_trans_create_temp_array), which arises because the temporary
is an incomplete type.
These problems are related to PR31217 and arose in the course of fixing that
pr.
A fix for both will be posted tonight, as long as the regtesting completes OK.
Cheers
Paul
--
Summary: Character assignment misses dependency
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: pault at gcc dot gnu dot org
ReportedBy: pault at gcc dot gnu dot org
BugsThisDependsOn: 31217
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33811