Comments

Looking at the remaining Tru64 UNIX testsuite failures, I noticed that
the gcc.dg/compat/struct-layout-1.exp tests are built with -fno-common
on PA HP-UX. Since Alpha Tru64 UNIX is often similar, I tried this and
in fact most of the failures are gone. The single one in
g++.dg/compat/struct-layout-1.exp is unaffected, but I changed that
along the same line for consistency.
Tested with the appropriate runtest invocations, installed on mainline.
There are only 4 remaining failures now:
FAIL: tmpdir-g++.dg-struct-layout-1/t027 cp_compat_x_tst.o-cp_compat_y_tst.o execute
FAIL: tmpdir-gcc.dg-struct-layout-1/t025 c_compat_x_tst.o-c_compat_y_tst.o execute
FAIL: tmpdir-gcc.dg-struct-layout-1/t027 c_compat_x_tst.o-c_compat_y_tst.o execute
FAIL: tmpdir-gcc.dg-struct-layout-1/t028 c_compat_x_tst.o-c_compat_y_tst.o execute
As an example, I had a look at tmpdir-gcc.dg-struct-layout-1/t025:
compiled with -DDBG, the first failure is
fail 2210.1
with 17 more (all N.1): the failure is like this:
typedef int __attribute__((mode(HI))) hi;
typedef hi __attribute__((vector_size (32))) v16hi;
struct S2210 { v16hi a; };
struct S2210 s2210;
extern struct S2210 a2210[5];
info.als = __alignof__ (s2210);
if (((long) &a2210[3]) & (info.als - 1)) printf ("fail %d.%d\n", 2210, 1), ++fails;
info.als is 32, ((long) &a2210[3]) & (info.als - 1) is 16; it seems the
alignment of vector types is inconsistent here.
Rainer
2011-06-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
PR middle-end/21953
* gcc.dg/compat/struct-layout-1_generate.c (dg-options): Use
-fno-common on alpha*-dec-osf*.
* g++.dg/compat/struct-layout-1_generate.c (dg-options): Likewise.