[Bug fortran/31821] character pointer => target(range) should detect if lengths don't match
tkoenig at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sat Dec 11 09:47:00 GMT 2010
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:
ig25@linux-fd1f:~/Krempel/Char> cat aa.f90
character (len=4), pointer:: s1
character (len=20), pointer :: p1
s1 = 'abcd'
p1 => s1(2:3)
end
ig25@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.
More information about the Gcc-bugs
mailing list