diff mbox

testsuite/gcc.dg/vect/pr44507.c

Message ID 20100616042317.GI9748@bubble.grove.modra.org
State New
Headers show

Commit Message

Alan Modra June 16, 2010, 4:23 a.m. UTC
testsuite/gcc.dg/vect/pr44507.c is invalid on LP64.  This:

    curVal = *((unsigned long *)(&pArray[index]));

loads 8 bytes, ie. the last time around the loop this loads 4 bytes past the
end of the array.  On big-endian machines this is the low 32 bits so the test
fails.

Committing the following as obvious.

	* gcc.dg/vect/pr44507.c (seeIf256ByteArrayIsConstant): Correct cast.
diff mbox

Patch

Index: gcc/testsuite/gcc.dg/vect/pr44507.c
===================================================================
--- gcc/testsuite/gcc.dg/vect/pr44507.c	(revision 160773)
+++ gcc/testsuite/gcc.dg/vect/pr44507.c	(working copy)
@@ -16,7 +16,7 @@  int seeIf256ByteArrayIsConstant(
            index < 64;
            index += (int)sizeof(unsigned int))
         {
-          curVal = *((unsigned long *)(&pArray[index]));
+          curVal = *((unsigned int *)(&pArray[index]));
           orVal = orVal | curVal;
           andVal = andVal & curVal;
         }