This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31803] ICE when for character pointer => target(range)
- 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: 3 May 2007 18:43:03 -0000
- Subject: [Bug fortran/31803] ICE when for character pointer => target(range)
- References: <bug-31803-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from burnus at gcc dot gnu dot org 2007-05-03 19:43 -------
==11966== Invalid read of size 8
==11966== at 0x41BF0C: gfc_check_pointer_assign (expr.c:2555)
==11966== by 0x4519D0: resolve_code (resolve.c:5225)
==11966== by 0x452D3D: resolve_codes (resolve.c:7386)
Better test case:
-------------------
character (len = 7), target :: textt
character (len = 7), pointer :: textp
character (len = 5), pointer :: textp2
textp => textt
textp2 => textt(1:5)
if(len(textp) /= 7) call abort()
if(len(textp2) /= 5) call abort()
textp = 'aaaaaaa'
textp2 = 'bbbbbbb'
if(textp /= 'bbbbbaa') call abort()
if(textp2 /= 'bbbbb') call abort()
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31803