From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 76494 invoked by alias); 26 Jan 2017 10:54:24 -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 76465 invoked by uid 89); 26 Jan 2017 10:54:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-5.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=gnu89, H*MI:sk:877f5ic, H*f:sk:877f5ic, H*i:sk:877f5ic X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 26 Jan 2017 10:54:13 +0000 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 36175C0467F1; Thu, 26 Jan 2017 10:54:13 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-185.ams2.redhat.com [10.36.117.185]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CF7631CD1B7; Thu, 26 Jan 2017 10:54:12 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id v0QAs8PU020022; Thu, 26 Jan 2017 11:54:09 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id v0QAs7UT020021; Thu, 26 Jan 2017 11:54:07 +0100 Date: Thu, 26 Jan 2017 10:55:00 -0000 From: Jakub Jelinek To: Thomas Schwinge , Richard Biener Cc: Martin =?utf-8?B?TGnFoWth?= , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Speed-up use-after-scope (re-writing to SSA) (version 2) Message-ID: <20170126105407.GZ1867@tucnak> Reply-To: Jakub Jelinek References: <20170116142025.GO1867@tucnak> <7e7f795d-a7a7-584e-8c77-61ea01207c40@suse.cz> <20170117164721.GE1867@tucnak> <20170119163358.GQ1867@tucnak> <5ca02d10-8023-63ea-1669-e5f56f08ec67@suse.cz> <20170120142717.GT1867@tucnak> <4e0e7dbe-e770-bc77-b25f-6f38f5125e89@suse.cz> <877f5ici6t.fsf@euler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <877f5ici6t.fsf@euler.schwinge.homeip.net> User-Agent: Mutt/1.7.1 (2016-10-04) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg02027.txt.bz2 On Thu, Jan 26, 2017 at 09:57:14AM +0100, Thomas Schwinge wrote: > Hi! > > On Mon, 23 Jan 2017 10:19:33 +0100, Martin Liška wrote: > > --- a/gcc/testsuite/gcc.dg/asan/use-after-scope-3.c > > +++ b/gcc/testsuite/gcc.dg/asan/use-after-scope-3.c > > @@ -1,5 +1,6 @@ > > // { dg-do run } > > // { dg-shouldfail "asan" } > > +// { dg-additional-options "-O0" } > > As these tests per "gcc/testsuite/gcc.dg/asan/asan.exp" are run with > "gcc-dg-runtest", which will "cycle through a list of optimization > options as c-torture does", is it really appropriate to hard-code "-O0" > here? Shouldn't instead be all testing be "dg-skip"ped (or similar) > unless "-O0" is in effect? Indeed, I see UNRESOLVED: gcc.dg/asan/use-after-scope-9.c -O2 -flto -fuse-linker-plugin -fno-fat-lto-objects scan-tree-dump-times asan1 "= ASAN_POISON \\\\(\\\\)" 1 too. For that kind of thing, the standard way is to add -ffat-lto-objects. As for -O* in */asan/* tests, that is indeed a bug, most tests do it right. The following patch should fix that, ok for trunk? 2017-01-26 Jakub Jelinek * c-c++-common/asan/pr63316.c: Use dg-skip-if instead of dg-options. * c-c++-common/asan/misalign-1.c: Likewise. * c-c++-common/asan/misalign-2.c: Likewise. * g++.dg/asan/pr69276.C: Add dg-skip-if, remove -O0 from dg-additional-options. * gcc.dg/asan/pr66314.c: Remove -Os from dg-options, add dg-skip-if. * gcc.dg/asan/use-after-scope-3.c: Use dg-skip-if instead of dg-options. * gcc.dg/asan/use-after-scope-9.c: Add dg-skip-if, remove -O2 and add -ffat-lto-objects from/to dg-additional-options. * gcc.dg/asan/use-after-scope-10.c: Add dg-skip-if, remove -O2 from dg-additional-options. --- gcc/testsuite/c-c++-common/asan/pr63316.c.jj 2014-09-24 11:13:43.000000000 +0200 +++ gcc/testsuite/c-c++-common/asan/pr63316.c 2017-01-26 11:38:32.172060026 +0100 @@ -1,6 +1,6 @@ /* PR sanitizer/63316 */ /* { dg-do run } */ -/* { dg-options "-fsanitize=address -O2" } */ +/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */ #ifdef __cplusplus extern "C" { --- gcc/testsuite/c-c++-common/asan/misalign-1.c.jj 2014-11-20 08:32:14.000000000 +0100 +++ gcc/testsuite/c-c++-common/asan/misalign-1.c 2017-01-26 11:37:57.964508495 +0100 @@ -1,5 +1,5 @@ /* { dg-do run { target { ilp32 || lp64 } } } */ -/* { dg-options "-O2" } */ +/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */ /* { dg-additional-options "-fno-omit-frame-pointer" { target *-*-darwin* } } */ /* { dg-shouldfail "asan" } */ --- gcc/testsuite/c-c++-common/asan/misalign-2.c.jj 2014-11-20 08:32:14.000000000 +0100 +++ gcc/testsuite/c-c++-common/asan/misalign-2.c 2017-01-26 11:38:06.756393231 +0100 @@ -1,5 +1,5 @@ /* { dg-do run { target { ilp32 || lp64 } } } */ -/* { dg-options "-O2" } */ +/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */ /* { dg-additional-options "-fno-omit-frame-pointer" { target *-*-darwin* } } */ /* { dg-shouldfail "asan" } */ --- gcc/testsuite/g++.dg/asan/pr69276.C.jj 2016-02-04 23:14:18.000000000 +0100 +++ gcc/testsuite/g++.dg/asan/pr69276.C 2017-01-26 11:40:10.490771046 +0100 @@ -1,6 +1,7 @@ /* { dg-do run } */ /* { dg-shouldfail "asan" } */ -/* { dg-additional-options "-O0 -fno-lto" } */ +/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */ +/* { dg-additional-options "-fno-lto" } */ #include --- gcc/testsuite/gcc.dg/asan/pr66314.c.jj 2015-08-24 18:26:58.000000000 +0200 +++ gcc/testsuite/gcc.dg/asan/pr66314.c 2017-01-26 11:31:13.234814878 +0100 @@ -1,5 +1,6 @@ /* { dg-do compile } */ -/* { dg-options "-std=gnu89 -Os -fprofile-arcs -fno-sanitize=all -fsanitize=kernel-address" } */ +/* { dg-options "-std=gnu89 -fprofile-arcs -fno-sanitize=all -fsanitize=kernel-address" } */ +/* { dg-skip-if "" { *-*-* } { "*" } { "-Os" } } */ char *a; int d; --- gcc/testsuite/gcc.dg/asan/use-after-scope-3.c.jj 2017-01-23 18:09:36.000000000 +0100 +++ gcc/testsuite/gcc.dg/asan/use-after-scope-3.c 2017-01-26 11:36:56.510314173 +0100 @@ -1,6 +1,6 @@ // { dg-do run } // { dg-shouldfail "asan" } -// { dg-additional-options "-O0" } +// { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } int main (void) --- gcc/testsuite/gcc.dg/asan/use-after-scope-9.c.jj 2017-01-23 18:09:36.000000000 +0100 +++ gcc/testsuite/gcc.dg/asan/use-after-scope-9.c 2017-01-26 11:37:03.891217408 +0100 @@ -1,6 +1,7 @@ // { dg-do run } // { dg-shouldfail "asan" } -// { dg-additional-options "-O2 -fdump-tree-asan1" } +// { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } +// { dg-additional-options "-fdump-tree-asan1 -ffat-lto-objects" } int main (int argc, char **argv) --- gcc/testsuite/gcc.dg/asan/use-after-scope-10.c.jj 2017-01-23 18:09:36.000000000 +0100 +++ gcc/testsuite/gcc.dg/asan/use-after-scope-10.c 2017-01-26 11:36:43.924479176 +0100 @@ -1,6 +1,7 @@ // { dg-do run } // { dg-shouldfail "asan" } -// { dg-additional-options "-O2 -fdump-tree-asan1" } +// { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } +// { dg-additional-options "-fdump-tree-asan1" } int main (int argc, char **argv) Jakub