This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

Re: 2 new testcases


On Tue, Jun 30, 1998 at 08:35:05PM -3100, H.J. Lu wrote:
> --- /dev/null	Wed Dec 31 16:00:00 1969
> +++ execute/980630-1.c	Tue Jun 30 20:07:49 1998
> @@ -0,0 +1,17 @@
> +long A [2] = {0};
> +long B [2] = {2, 0};
> +
> +main ()
> +{
> +  unsigned int i;
> +  long long u;
> +  for (i = 0; i < 2; i+=2)
> +  {
> +    u = A [i] + B [i];
> +    u = (long long) (*(((long *)&( u ))+1)) + A [i+1] + B [i+1];

This line will fail with big endian or -fstrict-aliasing.


r~


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