From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65027 invoked by alias); 10 Mar 2016 23:39:10 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 64914 invoked by uid 89); 10 Mar 2016 23:39:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=H*MI:32296, H*m:32296 X-HELO: mail-qg0-f43.google.com Received: from mail-qg0-f43.google.com (HELO mail-qg0-f43.google.com) (209.85.192.43) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 10 Mar 2016 23:38:59 +0000 Received: by mail-qg0-f43.google.com with SMTP id w104so85019673qge.1 for ; Thu, 10 Mar 2016 15:38:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=yes24kQD+HJTfMpawthhhBRausdMuabwHQbL7y2TY/w=; b=b+NG5Wl19G9C65k6Uxo8g2GLwFPbqeYOe48mvB9abNnBl6fVBJCHEiD7DklOeBxfkP EemfPNS5Sy3j2Qq+Thy2d6qAD4mH+sInRa3AwI4WPPKaOeVZGu+FqFNFbaVA8kRC5B+E eg1TkYCdsX9D21YrHOaoOh9JawSL9UrPUL9sxag4RMnid8kVD1Lh+rUyEHeWRDcbmCqq JNatBiZAcL9HUkgila4yx3LoB0MwgPwmpw2cal80s92vgE+cs5vyDuFEMavAWoA3/Ha/ IS1NuHBiqGgsn2PNbQSh0dZbOZtPgkBgYSBDV+oV9s2a1kBH+umcx1oh8S9p7nS8kDON oocg== X-Gm-Message-State: AD7BkJKw+9H0OiA6OTwemG4nazEeRFNFmhb/exm3z4LfG4Y8OMUaN9s0FOr0CIL5bnbT7Q== X-Received: by 10.140.161.198 with SMTP id h189mr8298667qhh.24.1457653137616; Thu, 10 Mar 2016 15:38:57 -0800 (PST) Received: from localhost.localdomain (ool-4353abbc.dyn.optonline.net. [67.83.171.188]) by smtp.gmail.com with ESMTPSA id y206sm2764446qhc.0.2016.03.10.15.38.56 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Mar 2016 15:38:56 -0800 (PST) From: Patrick Palka To: gcc-patches@gcc.gnu.org Cc: Patrick Palka Subject: [PATCH] Turn some compile-time tests into run-time tests Date: Thu, 10 Mar 2016 23:39:00 -0000 Message-Id: <1457653131-32296-1-git-send-email-patrick@parcs.ath.cx> X-SW-Source: 2016-03/txt/msg00673.txt.bz2 I ran the command git grep -l "dg-do compile" | xargs grep -l __builtin_abort | xargs grep -lw main to find tests marked as compile-time tests that likely ought to instead be marked as run-time tests, by the rationale that they use __builtin_abort and they also define main(). (I also then confirmed that they compile, link and run cleanly on my machine.) After this patch, the remaining test files reported by the above command are: These do not define all the functions they use: gcc/testsuite/g++.dg/ipa/devirt-41.C gcc/testsuite/g++.dg/ipa/devirt-44.C gcc/testsuite/g++.dg/ipa/devirt-45.C gcc/testsuite/gcc.target/i386/pr55672.c These are non-x86 tests so I can't confirm that they run cleanly: gcc/testsuite/gcc.target/arm/pr58041.c gcc/testsuite/gcc.target/powerpc/pr35907.c gcc/testsuite/gcc.target/s390/dwarfregtable-1.c gcc/testsuite/gcc.target/s390/dwarfregtable-2.c gcc/testsuite/gcc.target/s390/dwarfregtable-3.c These use dg-error: libstdc++-v3/testsuite/20_util/forward/c_neg.cc libstdc++-v3/testsuite/20_util/forward/f_neg.cc Bootstrapped and regtested on x86_64-pc-linux-gnu, does this look OK to commit? Does anyone have another heuristic one can use to help find these kinds of typos? gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-aggr2.C: Make it a run-time test. * g++.dg/cpp0x/nullptr32.C: Likewise. * g++.dg/cpp1y/digit-sep-cxx11-neg.C: Likewise. * g++.dg/cpp1y/digit-sep.C: Likewise. * g++.dg/ext/flexary13.C: Likewise. * gcc.dg/alias-14.c: Likewise. * gcc.dg/ipa/PR65282.c: Likewise. * gcc.dg/pr69644.c: Likewise. * gcc.dg/tree-ssa/pr38533.c: Likewise. * gcc.dg/tree-ssa/pr61385.c: Likewise. --- gcc/testsuite/g++.dg/cpp0x/constexpr-aggr2.C | 2 +- gcc/testsuite/g++.dg/cpp0x/nullptr32.C | 2 +- gcc/testsuite/g++.dg/cpp1y/digit-sep-cxx11-neg.C | 2 +- gcc/testsuite/g++.dg/cpp1y/digit-sep.C | 2 +- gcc/testsuite/g++.dg/ext/flexary13.C | 2 +- gcc/testsuite/gcc.dg/alias-14.c | 2 +- gcc/testsuite/gcc.dg/ipa/PR65282.c | 2 +- gcc/testsuite/gcc.dg/pr69644.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pr38533.c | 2 +- gcc/testsuite/gcc.dg/tree-ssa/pr61385.c | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-aggr2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-aggr2.C index 805d026..ed01aad 100644 --- a/gcc/testsuite/g++.dg/cpp0x/constexpr-aggr2.C +++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-aggr2.C @@ -1,5 +1,5 @@ // PR c++/68782 -// { dg-do compile { target c++11 } } +// { dg-do run { target c++11 } } #define assert(X) do { if (!(X)) __builtin_abort(); } while (0) diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr32.C b/gcc/testsuite/g++.dg/cpp0x/nullptr32.C index a1e6710..4de4140 100644 --- a/gcc/testsuite/g++.dg/cpp0x/nullptr32.C +++ b/gcc/testsuite/g++.dg/cpp0x/nullptr32.C @@ -1,6 +1,6 @@ // PR c++/63942 // A mangling alias for the first constructor was conflicting with the second. -// { dg-do compile { target c++11 } } +// { dg-do run { target c++11 } } // { dg-options "-fno-inline" } int i; diff --git a/gcc/testsuite/g++.dg/cpp1y/digit-sep-cxx11-neg.C b/gcc/testsuite/g++.dg/cpp1y/digit-sep-cxx11-neg.C index 411ba52..c1cbc6c 100644 --- a/gcc/testsuite/g++.dg/cpp1y/digit-sep-cxx11-neg.C +++ b/gcc/testsuite/g++.dg/cpp1y/digit-sep-cxx11-neg.C @@ -1,4 +1,4 @@ -// { dg-do compile { target { ! c++14 } } } +// { dg-do run { target { ! c++14 } } } #define assert(E) if(!(E))__builtin_abort(); diff --git a/gcc/testsuite/g++.dg/cpp1y/digit-sep.C b/gcc/testsuite/g++.dg/cpp1y/digit-sep.C index 111e7a5..75a12f6 100644 --- a/gcc/testsuite/g++.dg/cpp1y/digit-sep.C +++ b/gcc/testsuite/g++.dg/cpp1y/digit-sep.C @@ -1,4 +1,4 @@ -// { dg-do compile { target c++14 } } +// { dg-do run { target c++14 } } #define assert(E) if(!(E))__builtin_abort(); diff --git a/gcc/testsuite/g++.dg/ext/flexary13.C b/gcc/testsuite/g++.dg/ext/flexary13.C index 462ed65..1347542 100644 --- a/gcc/testsuite/g++.dg/ext/flexary13.C +++ b/gcc/testsuite/g++.dg/ext/flexary13.C @@ -1,4 +1,4 @@ -// { dg-do compile } +// { dg-do run } // { dg-options -Wno-pedantic } #define STR(s) #s diff --git a/gcc/testsuite/gcc.dg/alias-14.c b/gcc/testsuite/gcc.dg/alias-14.c index 1ca1c09..24f0d1c 100644 --- a/gcc/testsuite/gcc.dg/alias-14.c +++ b/gcc/testsuite/gcc.dg/alias-14.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do run } */ /* { dg-options "-O2" } */ #include void *a; diff --git a/gcc/testsuite/gcc.dg/ipa/PR65282.c b/gcc/testsuite/gcc.dg/ipa/PR65282.c index a52bec6..a7a881a 100644 --- a/gcc/testsuite/gcc.dg/ipa/PR65282.c +++ b/gcc/testsuite/gcc.dg/ipa/PR65282.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do run } */ /* { dg-options "-Os -fdump-ipa-icf" } */ int a[2]; diff --git a/gcc/testsuite/gcc.dg/pr69644.c b/gcc/testsuite/gcc.dg/pr69644.c index c60b191..bb775cd 100644 --- a/gcc/testsuite/gcc.dg/pr69644.c +++ b/gcc/testsuite/gcc.dg/pr69644.c @@ -1,5 +1,5 @@ /* PR target/69644 */ -/* { dg-do compile } */ +/* { dg-do run } */ int main () diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr38533.c b/gcc/testsuite/gcc.dg/tree-ssa/pr38533.c index ac8dfb9..05cb973 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr38533.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr38533.c @@ -1,5 +1,5 @@ /* PR middle-end/38533 */ -/* { dg-do compile } */ +/* { dg-do run } */ /* { dg-options "-O2 --param tree-reassoc-width=1 -fdump-tree-reassoc1" } */ #define A asm volatile ("" : "=r" (f) : "0" (0)); e |= f; diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr61385.c b/gcc/testsuite/gcc.dg/tree-ssa/pr61385.c index f2e5a3c..1762f02 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/pr61385.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/pr61385.c @@ -1,4 +1,4 @@ -/* { dg-do compile } */ +/* { dg-do run } */ /* { dg-options "-O2" } */ #define assert(x) if (!(x)) __builtin_abort () -- 2.8.0.rc1.12.gfce6d53