http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31821
Thomas Koenig <tkoenig at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tkoenig at gcc dot gnu.org --- Comment #4 from Thomas Koenig <tkoenig at gcc dot gnu.org> 2010-12-11 09:46:57 UTC --- The error message is wrong if the if (substring) primary->ts.cl = NULL; part is removed: i...@linux-fd1f:~/Krempel/Char> cat aa.f90 character (len=4), pointer:: s1 character (len=20), pointer :: p1 s1 = 'abcd' p1 => s1(2:3) end i...@linux-fd1f:~/Krempel/Char> gfortran aa.f90 aa.f90:4.2: p1 => s1(2:3) 1 Fehler: Unequal character lengths (20/4) in pointer assignment at (1) The length of the substring is wrongly taken to be 4, instead of 2.