Patchwork [testsuite] Build tmpdir-gcc.dg-struct-layout-1 tests with -fno-common on Tru64 UNIX (PR middle-end/21953)

login
register
mail settings
Submitter Rainer Orth
Date June 8, 2011, 11:47 a.m.
Message ID <ydd1uz4h7e8.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/99414/
State New
Headers show

Comments

Rainer Orth - June 8, 2011, 11:47 a.m.
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.

Patch

diff --git a/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
--- a/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
@@ -1,5 +1,6 @@ 
 /* Structure layout test generator.
-   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011
+   Free Software Foundation, Inc.
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
 This file is part of GCC.
@@ -45,7 +46,7 @@  along with GCC; see the file COPYING3.  
 const char *dg_options[] = {
 "/* { dg-options \"%s-I%s\" } */\n",
 "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
-"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
+"/* { dg-options \"%s-I%s -fno-common\" { target alpha*-dec-osf* hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
 "/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"
diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
@@ -1,5 +1,6 @@ 
 /* Structure layout test generator.
-   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011
+   Free Software Foundation, Inc.
    Contributed by Jakub Jelinek <jakub@redhat.com>.
 
 This file is part of GCC.
@@ -46,7 +47,7 @@  const char *dg_options[] = {
 "/* { dg-options \"%s-I%s\" } */\n",
 "/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
 "/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
-"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* } } */\n",
+"/* { dg-options \"%s-I%s -fno-common\" { target alpha*-dec-osf* hppa*-*-hpux* powerpc*-*-darwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n",
 "/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
 "/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"