This is the mail archive of the
mailing list for the GCC project.
Re: 2 new testcases
- To: mark at markmitchell dot com
- Subject: Re: 2 new testcases
- From: hjl at lucon dot org (H.J. Lu)
- Date: Wed, 1 Jul 1998 10:39:58 -0700 (PDT)
- Cc: rth at cygnus dot com, egcs-patches at cygnus dot com
> Ooops. I forgot about endian. We can move it to gcc.dg and
> test it on little endian machines only, like x86. As for
> -fstrict-aliasing, I have submitted a patch for the bug.
> It works with -fstrict-aliasing.
> It may at the moment. But, your code is not conforming ANSI C, even
> assuming the existence of long long. You are referencing a variable of
> type `long long' (namely `u') through a pointer of type `long'.
> That's a no-no. If you want to submit this test case, you should
> explicitly add -fno-strict-aliasing to the compiler options. IMO, you
The bug is in loop.c. It may or may not have anything to do with
alias. From what I have seen, it may happen in other cases. Please
refer to my previous analysis and patch for details.
> should write this code differently. The only even semi-portable way
> to do what you are doing is to use type-punning through unions.
That is what I have done.
H.J. Lu (firstname.lastname@example.org)