This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR31217 - ICE using FORALL on character substrings
- From: Tobias Burnus <burnus at net-b dot de>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>, gcc-patches List <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 18 Oct 2007 18:14:07 +0200
- Subject: Re: [Patch, fortran] PR31217 - ICE using FORALL on character substrings
- References: <339c37f20710180744yeaf6309u9060bf46b67a3ffd@mail.gmail.com>
Paul Richard Thomas wrote:
> Regtested on Cygwin_NT/amd64 (I'll do the checks tonight on
> x86_ia64/FC5) - OK for trunk?
>
Unfortunately not: If I regtest, I get an ICE (segmentation fault) for
the new forall_12.f90.
Minimal test case:
character(len=1) :: b(4) = (/"1","2","3","4"/)
forall(i=1:1) b(:)(i:i) = b(:)(i:i)
end
Valgrind shows (using Rev. 129442 and no other patches applied):
==14821== Invalid read of size 4
==14821== at 0x459520: find_forall_index (resolve.c:4339)
==14821== by 0x4597AD: find_forall_index (resolve.c:4383)
==14821== by 0x45987E: gfc_resolve_assign_in_forall (resolve.c:5729)
==14821== by 0x462C1C: resolve_code (resolve.c:5802)
==14821== by 0x463740: resolve_codes (resolve.c:8971)
==14821== by 0x463784: gfc_resolve (resolve.c:8990)
Tobias
PS: Do you also plan to submit
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31608#c28
It seems to fix all the problem reported in PR31608, which don't have
PRs of their own; that patch regtested successfully.