From patchwork Wed Jun 8 11:47:27 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rainer Orth X-Patchwork-Id: 99414 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 407CDB6F87 for ; Wed, 8 Jun 2011 21:48:02 +1000 (EST) Received: (qmail 28186 invoked by alias); 8 Jun 2011 11:47:57 -0000 Received: (qmail 28168 invoked by uid 22791); 8 Jun 2011 11:47:55 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 08 Jun 2011 11:47:39 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id EA6214BB; Wed, 8 Jun 2011 13:47:37 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id uEex-iZrVrwI; Wed, 8 Jun 2011 13:47:34 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id C1D334BA; Wed, 8 Jun 2011 13:47:34 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.4+Sun/8.14.4/Submit) id p58BlRxb004480; Wed, 8 Jun 2011 13:47:27 +0200 (MEST) From: Rainer Orth To: gcc-patches@gcc.gnu.org Cc: Richard Henderson Subject: [testsuite] Build tmpdir-gcc.dg-struct-layout-1 tests with -fno-common on Tru64 UNIX (PR middle-end/21953) Date: Wed, 08 Jun 2011 13:47:27 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 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. 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 . 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 . 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"