This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Some testsuite cleanup


On 28/07/16 22:06 +0100, Jonathan Wakely wrote:
The dg-options for FreeBSD and Dragonfly should have included
-std=gnu++11, or should have used dg-additional-options to add to,
rather than override, the common dg-options.

  Use dg-additional-options in libstdc++ tests
      * testsuite/17_intro/headers/c++2011/stdc++.cc: Change target-specific
      dg-options to dg-additional-options so that default options are used.
      * testsuite/17_intro/headers/c++2011/stdc++_multiple_inclusion.cc:
      Likewise.
      * testsuite/17_intro/headers/c++2014/stdc++.cc: Likewise.
      * testsuite/17_intro/headers/c++2014/stdc++_multiple_inclusion.cc:
      Likewise.
      * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
      Use dg-additional-options instead of repeating the common options.

That last test also needs to ensure optimization is used or the
scan-assembler check FAILs when --target_board=unix/-O0 is used.

Tested x86_64-linux, committed to trunk.


commit 34e4034a9fceed99b0d63ad1f4357ea7920630bb
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Sun Jul 31 20:23:20 2016 +0100

    Ensure std::atomic test is compiled with optimization
    
    	* testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
    	Ensure test is compiled with optimization.

diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc
index f4a88f6..b8f263f 100644
--- a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc
+++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc
@@ -1,5 +1,5 @@
 // { dg-do compile { target i?86-*-* x86_64-*-* } }
-// { dg-options "-std=gnu++11 -g0 -fno-exceptions -fno-asynchronous-unwind-tables" }
+// { dg-options "-std=gnu++11 -O2 -g0 -fno-exceptions -fno-asynchronous-unwind-tables" }
 // { dg-additional-options "-march=i486" { target ia32 } }
 // { dg-final { scan-assembler-times "xacquire\|\.byte\[^\n\r]*0xf2" 14 } }
 // { dg-final { scan-assembler-times "xrelease\|\.byte\[^\n\r]*0xf3" 14 } }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]