This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31821] character pointer => target(range) should detect if lengths don't match
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 4 May 2007 21:14:23 -0000
- Subject: [Bug fortran/31821] character pointer => target(range) should detect if lengths don't match
- References: <bug-31821-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2007-05-04 22:14 -------
See also: http://gcc.gnu.org/ml/fortran/2007-05/msg00072.html
One also needs a run-time test for:
character (len=4), target :: s1
character (len=2), pointer :: p1
s1 = 'abcd'
p1 => s1(1:2)
if(s1 /= 'abcd') call abort()
if(p1 /= 'ab') call abort()
end
There might be already such a check, though.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31821