From patchwork Fri Jul 26 16:02:15 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Joern Rennecke X-Patchwork-Id: 262208 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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id B74E42C00C3 for ; Sat, 27 Jul 2013 02:02:33 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:to:subject:references:in-reply-to :mime-version:content-type:content-transfer-encoding; q=dns; s= default; b=oj/IaAD+NzULn3LKCphyTkrQkGXqukf9lCIpKIJYSm5JLGbF3ArHS qqVHA3wGkAbBQsknB1hBauEXYzrIMIBK7gtM70M7cnY2ERMTCrp4qeeXtkWUIG5w 0CmH2RCjX5p1gAmN+64jYXjhmMY+kdEgdlIrSFz36+pf5hfmzD7PBI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:to:subject:references:in-reply-to :mime-version:content-type:content-transfer-encoding; s=default; bh=q0RE/LfGzN7eOYHelPnfNL0kbhY=; b=lew5pJMKgMf6uiX88BTXtJXXIqXp okQORG1m9wwdYdCpJFmaSxeOmoeXGWPC5jV+AO+MdGUGn/BtyiKfDjiBRqewLy3N xT88bZ0e/42RJyuLCcaSNK8QnrcHkCIcN26sI1lFt2bP+33SniUkjF10qmHMbYZy 5Lokk47Mk857eZU= Received: (qmail 7558 invoked by alias); 26 Jul 2013 16:02:26 -0000 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 Received: (qmail 7533 invoked by uid 89); 26 Jul 2013 16:02:25 -0000 X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_50, KHOP_RCVD_UNTRUST, KHOP_THREADED, MIME_QP_LONG_LINE, RCVD_IN_DNSWL_MED, RCVD_IN_HOSTKARMA_NO, RCVD_IN_HOSTKARMA_W, RDNS_NONE, TW_JS autolearn=ham version=3.3.1 Received: from Unknown (HELO c62.cesmail.net) (216.154.195.54) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 26 Jul 2013 16:02:23 +0000 Received: from unknown (HELO epsilon2) ([192.168.1.60]) by c62.cesmail.net with ESMTP; 26 Jul 2013 12:02:15 -0400 Received: from cust213-dsl91-135-11.idnet.net (cust213-dsl91-135-11.idnet.net [91.135.11.213]) by webmail.spamcop.net (Horde MIME library) with HTTP; Fri, 26 Jul 2013 12:02:15 -0400 Message-ID: <20130726120215.9x4drwecwsk4044w-nzlynne@webmail.spamcop.net> Date: Fri, 26 Jul 2013 12:02:15 -0400 From: Joern Rennecke To: gcc-patches@gcc.gnu.org Subject: committed: Skip tests for epiphany that make invalid struct layout assumptions References: <20110925083619.amfz0d03kwwogo0c-nzlynne@webmail.spamcop.net> In-Reply-To: MIME-Version: 1.0 User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) X-Virus-Found: No Quoting Richard Guenther : > On Sun, Sep 25, 2011 at 2:36 PM, Joern Rennecke wrote: >> This patch has not been reviewed for eight weeks. >> >> ----- Forwarded message from amylaar@spamcop.net ----- >>    Date: Mon, 01 Aug 2011 01:01:13 -0400 >>    From: Joern Rennecke >> Reply-To: Joern Rennecke >>  Subject: RFA: Testsuite fixes (2/3): struct padding / alignment >>      To: gcc-patches@gcc.gnu.org >> >> I am working with a target port that adds alignment and/or padding to >> certain >> structures.  This causes some tests to fail that assume such padding does >> not exist. >> >> Fixed by adding a packed attribute to the structures in question. > > I think you should instead dg-skip the tests on your target. At least ... Done thusly. 2013-07-26 Joern Rennecke Skip tests that make assumptions about struct layout that don't hold on epiphany: * g++.dg/cpp0x/cast.C: Skip for epiphany-*-*. * g++.dg/cpp0x/iop.C: Likewise. * g++.dg/cpp0x/named_refs.C: Likewise. * g++.dg/cpp0x/rv1p.C: Likewise. * g++.dg/cpp0x/rv2p.C: Likewise. * g++.dg/cpp0x/rv3p.C: Likewise. * g++.dg/cpp0x/rv4p.C: Likewise. * g++.dg/cpp0x/rv5p.C: Likewise. * g++.dg/cpp0x/rv6p.C: Likewise. * g++.dg/cpp0x/rv7p.C: Likewise. * g++.dg/cpp0x/rv8p.C: Likewise. * g++.dg/ext/strncpy-chk1.C: Likewise. * gcc.dg/builtin-object-size-10.c: Likewise. * gcc.dg/builtin-object-size-11.c: Likewise. * gcc.dg/builtin-stringop-chk-1.c: Likewise. * gcc.dg/pr25805.c: Likewise. * gcc.c-torture/execute/builtins/memcpy-chk.x: New file. * gcc.c-torture/execute/builtins/memmove-chk.x: Likewise. * gcc.c-torture/execute/builtins/mempcpy-chk.x: Likewise. * gcc.c-torture/execute/builtins/memset-chk.x: Likewise. * gcc.c-torture/execute/builtins/snprintf-chk.x: Likewise. * gcc.c-torture/execute/builtins/sprintf-chk.x: Likewise. * gcc.c-torture/execute/builtins/stpcpy-chk.x: Likewise. * gcc.c-torture/execute/builtins/strcat-chk.x: Likewise. * gcc.c-torture/execute/builtins/strcpy-chk.x: Likewise. * gcc.c-torture/execute/builtins/strncat-chk.x: Likewise. * gcc.c-torture/execute/builtins/strncpy-chk.x: Likewise. * gcc.c-torture/execute/builtins/vsnprintf-chk.x: Likewise. * gcc.c-torture/execute/builtins/vsprintf-chk.x: Likewise. * gcc.c-torture/execute/zerolen-2.x: Likewise. Index: testsuite/gcc.c-torture/execute/zerolen-2.x =================================================================== --- testsuite/gcc.c-torture/execute/zerolen-2.x (revision 0) +++ testsuite/gcc.c-torture/execute/zerolen-2.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of larger-than-word padding. + # to make this true for struct foo on epiphany would require + # __attribute__((packed,aligned(__alignof__(word)))) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test4 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test3_sub struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test3_sub struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test3 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test4 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test4 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test4 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/strncat-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/strncat-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/strncat-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test3 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test3 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/memset-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/memset-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/memset-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test3 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/memmove-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/memmove-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/memmove-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test5 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test4 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.c-torture/execute/builtins/strcat-chk.x =================================================================== --- testsuite/gcc.c-torture/execute/builtins/strcat-chk.x (revision 0) +++ testsuite/gcc.c-torture/execute/builtins/strcat-chk.x (revision 201268) @@ -0,0 +1,7 @@ +if [istarget "epiphany-*-*"] { + # This test assumes the absence of struct padding. + # to make this true for test3 struct A on epiphany would require + # __attribute__((packed)) . + return 1 +} +return 0 Index: testsuite/gcc.dg/builtin-object-size-10.c =================================================================== --- testsuite/gcc.dg/builtin-object-size-10.c (revision 201267) +++ testsuite/gcc.dg/builtin-object-size-10.c (revision 201268) @@ -1,5 +1,6 @@ /* { dg-do compile } */ /* { dg-options "-O2 -fdump-tree-objsz1-details" } */ +// { dg-skip-if "packed attribute missing for drone_source_packet" { "epiphany-*-*" } { "*" } { "" } } typedef struct { char sentinel[4]; Index: testsuite/gcc.dg/builtin-object-size-11.c =================================================================== --- testsuite/gcc.dg/builtin-object-size-11.c (revision 201267) +++ testsuite/gcc.dg/builtin-object-size-11.c (revision 201268) @@ -1,6 +1,7 @@ /* PR48985 */ /* { dg-do run } */ /* { dg-options "-std=gnu89" } */ +/* { dg-skip-if "packed attribute missing for struct s" { "epiphany-*-*" } { "*" } { "" } } */ extern void abort (void); Index: testsuite/gcc.dg/pr25805.c =================================================================== --- testsuite/gcc.dg/pr25805.c (revision 201267) +++ testsuite/gcc.dg/pr25805.c (revision 201268) @@ -2,6 +2,7 @@ storage for d1.a. */ /* { dg-do run } */ /* { dg-options "" } */ +/* { dg-skip-if "packed attribute missing for d1" { "epiphany-*-*" } { "*" } { "" } } */ extern void abort (void); extern void exit (int); Index: testsuite/gcc.dg/builtin-stringop-chk-1.c =================================================================== --- testsuite/gcc.dg/builtin-stringop-chk-1.c (revision 201267) +++ testsuite/gcc.dg/builtin-stringop-chk-1.c (revision 201268) @@ -3,6 +3,7 @@ /* { dg-do compile } */ /* { dg-options "-O2 -std=gnu99 -ftrack-macro-expansion=0" } */ /* { dg-additional-options "-mstructure-size-boundary=8" { target arm*-*-* } } */ +// { dg-skip-if "packed attribute missing for t" { "epiphany-*-*" } { "*" } { "" } } extern void abort (void); Index: testsuite/g++.dg/ext/strncpy-chk1.C =================================================================== --- testsuite/g++.dg/ext/strncpy-chk1.C (revision 201267) +++ testsuite/g++.dg/ext/strncpy-chk1.C (revision 201268) @@ -1,6 +1,7 @@ // PR c++/40502 // { dg-do compile } // { dg-options "-O2" } +// { dg-skip-if "packed attribute missing for struct A" { "epiphany-*-*" } { "*" } { "" } } struct A { char x[12], y[35]; }; struct B { char z[50]; }; Index: testsuite/g++.dg/cpp0x/rv2p.C =================================================================== --- testsuite/g++.dg/cpp0x/rv2p.C (revision 201267) +++ testsuite/g++.dg/cpp0x/rv2p.C (revision 201268) @@ -4,6 +4,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {}; Index: testsuite/g++.dg/cpp0x/rv4p.C =================================================================== --- testsuite/g++.dg/cpp0x/rv4p.C (revision 201267) +++ testsuite/g++.dg/cpp0x/rv4p.C (revision 201268) @@ -4,6 +4,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {}; Index: testsuite/g++.dg/cpp0x/named_refs.C =================================================================== --- testsuite/g++.dg/cpp0x/named_refs.C (revision 201267) +++ testsuite/g++.dg/cpp0x/named_refs.C (revision 201268) @@ -4,6 +4,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {}; Index: testsuite/g++.dg/cpp0x/rv6p.C =================================================================== --- testsuite/g++.dg/cpp0x/rv6p.C (revision 201267) +++ testsuite/g++.dg/cpp0x/rv6p.C (revision 201268) @@ -4,6 +4,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {}; Index: testsuite/g++.dg/cpp0x/cast.C =================================================================== --- testsuite/g++.dg/cpp0x/cast.C (revision 201267) +++ testsuite/g++.dg/cpp0x/cast.C (revision 201268) @@ -4,6 +4,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {}; Index: testsuite/g++.dg/cpp0x/rv8p.C =================================================================== --- testsuite/g++.dg/cpp0x/rv8p.C (revision 201267) +++ testsuite/g++.dg/cpp0x/rv8p.C (revision 201268) @@ -4,6 +4,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {}; Index: testsuite/g++.dg/cpp0x/rv1p.C =================================================================== --- testsuite/g++.dg/cpp0x/rv1p.C (revision 201267) +++ testsuite/g++.dg/cpp0x/rv1p.C (revision 201268) @@ -4,6 +4,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {}; Index: testsuite/g++.dg/cpp0x/rv3p.C =================================================================== --- testsuite/g++.dg/cpp0x/rv3p.C (revision 201267) +++ testsuite/g++.dg/cpp0x/rv3p.C (revision 201268) @@ -4,6 +4,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {}; Index: testsuite/g++.dg/cpp0x/iop.C =================================================================== --- testsuite/g++.dg/cpp0x/iop.C (revision 201267) +++ testsuite/g++.dg/cpp0x/iop.C (revision 201268) @@ -8,6 +8,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {}; Index: testsuite/g++.dg/cpp0x/rv5p.C =================================================================== --- testsuite/g++.dg/cpp0x/rv5p.C (revision 201267) +++ testsuite/g++.dg/cpp0x/rv5p.C (revision 201268) @@ -4,6 +4,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {}; Index: testsuite/g++.dg/cpp0x/rv7p.C =================================================================== --- testsuite/g++.dg/cpp0x/rv7p.C (revision 201267) +++ testsuite/g++.dg/cpp0x/rv7p.C (revision 201268) @@ -4,6 +4,7 @@ // { dg-do compile } // { dg-options "-std=c++0x" } +// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } } template struct sa; template <> struct sa {};