Concerning:
2008-11-20 Richard Guenther <[email protected]>
PR tree-optimization/37868
* gcc.dg/torture/pr37868.c: New testcase.
* gcc.c-torture/execute/pr38048-1.c: Likewise.
* gcc.c-torture/execute/pr38048-2.c: Likewise.
So, is there any reason why we can't make the test case portable as in the
below instead of skipping on all the targets that blow on misaligned data?
Ok?
diff --git a/gcc/testsuite/gcc.dg/torture/pr37868.c
b/gcc/testsuite/gcc.dg/torture/pr37868.c
index 380b089..b7ff43f 100644
--- a/gcc/testsuite/gcc.dg/torture/pr37868.c
+++ b/gcc/testsuite/gcc.dg/torture/pr37868.c
@@ -24,15 +24,18 @@ struct X {
int main (void)
{
- struct X x;
+ union {
+ struct X x;
+ unsigned int i;
+ } s;
unsigned int bad_bits;
- x.pad = -1;
- x.a = -1;
- x.b = -1;
- x.c = -1;
+ s.x.pad = -1;
+ s.x.a = -1;
+ s.x.b = -1;
+ s.x.c = -1;
- bad_bits = ((unsigned int)-1) ^ *(1+(unsigned int *) &x);
+ bad_bits = ((unsigned int)-1) ^ *(1+(unsigned int *) &s.x);
if (bad_bits != 0)
abort ();
return 0;