This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch, fortran] PR34537 - ICE or wrong code for TRANSFER of constant string to character
- From: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- To: "Tobias Burnus" <burnus at net-b dot de>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, "fortran at gcc dot gnu dot org" <fortran at gcc dot gnu dot org>
- Date: Fri, 11 Jan 2008 17:02:16 +0100
- Subject: Re: [Patch, fortran] PR34537 - ICE or wrong code for TRANSFER of constant string to character
- References: <339c37f20801110457u54f60c35x32bc062ba1d076ec@mail.gmail.com> <478779B4.7090706@net-b.de> <47877F0F.5080106@net-b.de>
Tobias,
> allocate(ptr(8))
> ptr = transfer('Sample#0'//achar(0),ptr) ! Causes ICE
>
> is bad, because you transfer 9 bytes to a (pointer to a) 8-byte array.
aacchhh, bother! A last minute addition of #n to correspond to the PR
and I forgot about the size of the array.
Thanks!
Paul