This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pr27449 - transfer intrinsic does not work on strict aligned systems


--- 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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]