From 70614cb9031227aa3402192bdfa7b9d28ed0f0d6 Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Fri, 2 Mar 2018 17:35:36 +0100 Subject: [PATCH] Fix "dg-lto-options" misuse gcc/testsuite/ * g++.dg/lto/20080915_0.C: Don't use "dg-lto-options". * g++.dg/lto/20080907_0.C: Use "#pragma GCC" instead of "dg-lto-options". * g++.dg/lto/20101010-1_0.C: Likewise. * g++.dg/lto/20101010-2_0.C: Likewise. Reviewed-by: Jason Merrill From-SVN: r258142 --- gcc/testsuite/ChangeLog | 8 ++++++++ gcc/testsuite/g++.dg/lto/20080907_0.C | 4 +++- gcc/testsuite/g++.dg/lto/20080915_0.C | 1 - gcc/testsuite/g++.dg/lto/20101010-1_0.C | 4 +++- gcc/testsuite/g++.dg/lto/20101010-2_0.C | 4 +++- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 84ebf2e694c..3864204337d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,11 @@ +2018-03-02 Thomas Schwinge + + * g++.dg/lto/20080915_0.C: Don't use "dg-lto-options". + * g++.dg/lto/20080907_0.C: Use "#pragma GCC" instead of + "dg-lto-options". + * g++.dg/lto/20101010-1_0.C: Likewise. + * g++.dg/lto/20101010-2_0.C: Likewise. + 2018-03-02 Jakub Jelinek PR ipa/84628 diff --git a/gcc/testsuite/g++.dg/lto/20080907_0.C b/gcc/testsuite/g++.dg/lto/20080907_0.C index a423196e7db..153d0ab8c06 100644 --- a/gcc/testsuite/g++.dg/lto/20080907_0.C +++ b/gcc/testsuite/g++.dg/lto/20080907_0.C @@ -1,5 +1,7 @@ // { dg-lto-do assemble } -// { dg-lto-options "-Wno-return-type" } + +/* "WARNING: lto.exp does not support dg-additional-options" */ +#pragma GCC diagnostic ignored "-Wreturn-type" struct Foo { void func (); }; Foo & bar () { } struct Baz { Baz (Baz &); }; Baz dummy() { bar().func(); } diff --git a/gcc/testsuite/g++.dg/lto/20080915_0.C b/gcc/testsuite/g++.dg/lto/20080915_0.C index 40c50422857..c91e7568169 100644 --- a/gcc/testsuite/g++.dg/lto/20080915_0.C +++ b/gcc/testsuite/g++.dg/lto/20080915_0.C @@ -1,5 +1,4 @@ // { dg-lto-do assemble } -// { dg-lto-options "-Wno-return-type" } struct Foo { static const int dummy; diff --git a/gcc/testsuite/g++.dg/lto/20101010-1_0.C b/gcc/testsuite/g++.dg/lto/20101010-1_0.C index 8f694c78aa7..bb3e6d48415 100644 --- a/gcc/testsuite/g++.dg/lto/20101010-1_0.C +++ b/gcc/testsuite/g++.dg/lto/20101010-1_0.C @@ -1,5 +1,7 @@ // { dg-lto-do link } -// { dg-lto-options "-Wno-return-type" } + +/* "WARNING: lto.exp does not support dg-additional-options" */ +#pragma GCC diagnostic ignored "-Wreturn-type" typedef long size_t; template < class, class > struct pair diff --git a/gcc/testsuite/g++.dg/lto/20101010-2_0.C b/gcc/testsuite/g++.dg/lto/20101010-2_0.C index a26956f7fc7..721ac015e67 100644 --- a/gcc/testsuite/g++.dg/lto/20101010-2_0.C +++ b/gcc/testsuite/g++.dg/lto/20101010-2_0.C @@ -1,5 +1,7 @@ // { dg-lto-do link } -// { dg-lto-options "-Wno-return-type" } + +/* "WARNING: lto.exp does not support dg-additional-options" */ +#pragma GCC diagnostic ignored "-Wreturn-type" typedef int size_t; template < size_t _Nw > struct _Base_bitset -- 2.30.2