This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: pr27449 - transfer intrinsic does not work on strict aligned systems
- From: Feng Wang <wf_cs at yahoo dot com>
- To: Paul Thomas <paulthomas2 at wanadoo dot fr>
- Cc: "'fortran at gcc dot gnu dot org'" <fortran at gcc dot gnu dot org>, Steve Ellcey <sje at cup dot hp dot com>
- Date: Mon, 15 May 2006 13:16:24 +0800 (CST)
- Subject: Re: pr27449 - transfer intrinsic does not work on strict aligned systems
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=6ahmYkS+3z24lbt2Y/NYb/xLTE3ejYpStpoH4wce5DtWJ4PIxq0VKzFBSjJSfmfMP2yp4P7JbVYe2p0cShju7GeFy4ofOh+JwsIyfuYE5kxrHPSDSQP/TNYM+K3hjOt3MXtVQjQ4eQNDbACoBuvcW7iOpcWzZTjnCVAiYZltNYo= ;
--- Paul Thomas <paulthomas2@wanadoo.fr> wrote:
Paul,
>
> First of all, hello, how are you?
>
Hello. I'm fine. Thank you :-)
> >ic[NON_LVALUE_EXPR <S.3>] = (*(int8[0:] *) atmp.2.data)[NON_LVALUE_EXPR
> <S.3>];
> >
> >I think Steve is right. And setting TYPE_REF_CAN_ALIAS_ALL flag to type node
> >when convert atmp.2.data to (int8 *) may solve this. But now I have no time
> to
> >dig more.
> >
> >
> I will take a look at this tonight. I keep meaning to take a note of
> some of the more important to these tree_ssa flags. Perhaps this is an
> opportunity to do so.
>
I tried your patch for pr27155 on ia64 but it does not work. I once said that
TYPE_REF_CAN_ALIAS_ALL may solve this. But now I don't think it is useful. It's
a data aligned problem and should have nothing to do with instructions. And I
doubt that if it is a compiler problem. Maybe it belongs to program error. The
following C code has the same problem on ia64.
#include "stdio.h"
unsigned long long ull;
int main ()
{
char volatile d = 'd';
char volatile b[] = "abcdefgh";
ull = * (unsigned long long *) &b;
printf ("%ld\n", ull);
}
[wf@s98 bug]$ ~/local/bin/gcc -v
Using built-in specs.
Target: ia64-unknown-linux-gnu
Configured with: ../trunk/configure --enable-languages=fortran
--prefix=/home/wf/local --disable-bootstrap
Thread model: posix
gcc version 4.2.0 20060512 (experimental)
[wf@s98 bug]$ ~/local/bin/gcc c.c -static
[wf@s98 bug]$ ./a.out
a.out(23079): unaligned access to 0x60000fffffffb6b1, ip=0x40000000000004d0
7523094288207667809
Best Regards,
Feng Wang
--
Creative Compiler Research Group,
National University of Defense Technology, China.
___________________________________________________________
雅虎免费邮箱-3.5G容量,20M附件
http://cn.mail.yahoo.com/