From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38881 invoked by alias); 16 Apr 2019 13:07:54 -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 38868 invoked by uid 89); 16 Apr 2019 13:07:53 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-7.1 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=14PM, 14pm 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; Tue, 16 Apr 2019 13:07:52 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1015F81DE9; Tue, 16 Apr 2019 13:07:49 +0000 (UTC) Received: from tucnak.zalov.cz (unknown [10.40.205.45]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AA14B5D707; Tue, 16 Apr 2019 13:07:48 +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 x3GD7ku8032131; Tue, 16 Apr 2019 15:07:46 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id x3GD7i94032130; Tue, 16 Apr 2019 15:07:44 +0200 Date: Tue, 16 Apr 2019 13:08:00 -0000 From: Jakub Jelinek To: Jan Hubicka Cc: "Dominique =?iso-8859-1?Q?d'Humi=E8res?=" , gcc-patches Subject: Re: Fix false -Wodr warnings Message-ID: <20190416130744.GG21066@tucnak> Reply-To: Jakub Jelinek References: <553C9698-9DAE-4C8F-A7EE-2402EBA68934@lps.ens.fr> <20190416125114.uofbvksbpxbzo5au@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190416125114.uofbvksbpxbzo5au@kam.mff.cuni.cz> User-Agent: Mutt/1.11.3 (2019-02-01) X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00641.txt.bz2 On Tue, Apr 16, 2019 at 02:51:14PM +0200, Jan Hubicka wrote: > > Hi Jan, > > > > The test causes > > > > WARNING: lto.exp does not support dg-do > > WARNING: lto.exp does not support dg-options in primary source file > > > > This is fixed by the following patch > > > > --- ../_clean/gcc/testsuite/g++.dg/lto/pr89358_0.C 2019-04-15 00:04:48.000000000 +0200 > > +++ gcc/testsuite/g++.dg/lto/pr89358_0.C 2019-04-16 13:13:14.000000000 +0200 > > @@ -1,5 +1,5 @@ > > -/* { dg-do link } */ > > -/* { dg-options "-std=c++17" } */ > > +/* { dg-lto-do link } */ > > +/* { dg-lto-options "-std=c++17" } */ > > Thanks, this changle is OK. > Honza > > #include > > > > extern void test(); > > --- ../_clean/gcc/testsuite/g++.dg/lto/pr89358_1.C 2019-04-15 00:04:48.000000000 +0200 > > +++ gcc/testsuite/g++.dg/lto/pr89358_1.C 2019-04-16 13:14:44.000000000 +0200 > > @@ -1,4 +1,3 @@ > > -/* { dg-options "-std=c++14" } */ But this change is not ok and makes the test useless. The whole point of the test is to test if compiling one TU with -std=c++17 and another one with -std=c++14 and linking them together doesn't produce warnings. I think dg-options in *_1.C is ok, several tests have those: 20100302_1.C:// { dg-options "-fabi-version=0" } pr60150_1.C:// { dg-options "-fno-lto" } pr63270_2.C:// { dg-options "-fno-lto" } pr64076_1.C:// { dg-options -fno-lto } pr65276_1.C:// { dg-options "-O2" } pr68811_1.C:// { dg-options "-O2 -flto -w" } Jakub