PR testsuite/50145
* gcc.dg/torture/pr50067-1.c: Run on little-endian systems only.
* gcc.dg/torture/pr50067-2.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177952
138bc75d-0d04-0410-961f-
82ee72b054a4
+2011-08-22 Richard Guenther <rguenther@suse.de>
+
+ PR testsuite/50145
+ * gcc.dg/torture/pr50067-1.c: Run on little-endian systems only.
+ * gcc.dg/torture/pr50067-2.c: Likewise.
+
2011-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/47659
short b[32] = { 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, };
int main()
{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
int i;
- for (i = 0; i < 32; ++i)
- (*((unsigned short(*)[32])&a[0]))[i] = (*((char(*)[32])&a[0]))[i+8];
- if (memcmp (&a, &b, sizeof (a)) != 0)
- abort ();
+ if (sizeof (short) == 2)
+ {
+ for (i = 0; i < 32; ++i)
+ (*((unsigned short(*)[32])&a[0]))[i] = (*((char(*)[32])&a[0]))[i+8];
+ if (memcmp (&a, &b, sizeof (a)) != 0)
+ abort ();
+ }
+#endif
return 0;
}
short b[32] = { 4, 0, 5, 0, 6, 0, 7, 0, 8, 0, };
int main()
{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
int i;
- for (i = 0; i < 32; ++i)
+ if (sizeof (short) == 2)
{
- a[i] = (*((char(*)[32])&a[0]))[i+8];
+ for (i = 0; i < 32; ++i)
+ {
+ a[i] = (*((char(*)[32])&a[0]))[i+8];
+ }
+ if (memcmp (&a, &b, sizeof (a)) != 0)
+ abort ();
}
- if (memcmp (&a, &b, sizeof (a)) != 0)
- abort ();
+#endif
return 0;
}