This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran 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
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=mSCUK7e/87cDcAdT0gAnPONF/QzpNkxDaxjpsZLBl5o=; b=A6sU9UX6cbu0WkCLkirlI1uO+Iz/aAUJtdT/Hkk/nan15mFVWfFitAS8frrYKq+UqmkLfV/9COC2VSF51RumWP342ZxbfvWhq8Ndv+VlawMcRShpZZYM7fP1EtDvBJhYb0iK5pPkxodgm0xX/29siY6nCM2jla+TVhBryaOfo5M=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=k682kcRER51KydBARqLaZB+UwoWPg9k4R8nYDeFG04heGoTiA4sYyD7/hZhtnYFMlgk9YW5Kt8BlZ57+ONRpQZ1hSQfwCsNEjgV2VpA2MvEMClBEbWUeAFoOYoh35FpNMlY78+Z1TQg0EErDk+ZIvvvzRe/UFhHWP/Q6WA1LDXs=
- 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