From c8798f2ce103aaf7f1c903a8babbd815d7b9a9fc Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Tue, 13 Sep 2016 15:30:13 +0200 Subject: [PATCH] Add new effective target: profile_update_atomic * g++.dg/gcov/gcov-threads-1.C: Use profile_update_atomic effective target. * gcc.dg/tree-prof/val-profiler-threads-1.c: Likewise. * lib/target-supports.exp: Define the new target. From-SVN: r240111 --- gcc/testsuite/ChangeLog | 7 +++++++ gcc/testsuite/g++.dg/gcov/gcov-threads-1.C | 1 + gcc/testsuite/gcc.dg/tree-prof/val-profiler-threads-1.c | 2 ++ gcc/testsuite/lib/target-supports.exp | 7 +++++++ 4 files changed, 17 insertions(+) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 9e59b031c57..d9d682577bc 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2016-09-13 Martin Liska + + * g++.dg/gcov/gcov-threads-1.C: Use profile_update_atomic + effective target. + * gcc.dg/tree-prof/val-profiler-threads-1.c: Likewise. + * lib/target-supports.exp: Define the new target. + 2016-09-12 Andrew Pinski * gcc.target/aarch64/thunderxloadpair.c: New testcase. diff --git a/gcc/testsuite/g++.dg/gcov/gcov-threads-1.C b/gcc/testsuite/g++.dg/gcov/gcov-threads-1.C index a4a6f0a6ae3..cc9266ab8ea 100644 --- a/gcc/testsuite/g++.dg/gcov/gcov-threads-1.C +++ b/gcc/testsuite/g++.dg/gcov/gcov-threads-1.C @@ -1,5 +1,6 @@ /* { dg-options "-fprofile-arcs -ftest-coverage -pthread -fprofile-update=atomic" } */ /* { dg-do run { target native } } */ +/* { dg-require-effective-target profile_update_atomic } */ #include #include diff --git a/gcc/testsuite/gcc.dg/tree-prof/val-profiler-threads-1.c b/gcc/testsuite/gcc.dg/tree-prof/val-profiler-threads-1.c index e9b04a0e67d..95d6ee3b4a3 100644 --- a/gcc/testsuite/gcc.dg/tree-prof/val-profiler-threads-1.c +++ b/gcc/testsuite/gcc.dg/tree-prof/val-profiler-threads-1.c @@ -1,4 +1,6 @@ /* { dg-options "-O0 -pthread -fprofile-update=atomic" } */ +/* { dg-require-effective-target profile_update_atomic } */ + #include #define NUM_THREADS 8 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 545b3dc38c9..6724a7fd214 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -7699,3 +7699,10 @@ proc check_effective_target_offload_hsa { } { int main () {return 0;} } "-foffload=hsa" ] } + +# Return 1 if the target support -fprofile-update=atomic +proc check_effective_target_profile_update_atomic {} { + return [check_no_compiler_messages profile_update_atomic assembly { + int main (void) { return 0; } + } "-fprofile-update=atomic -fprofile-generate"] +} -- 2.30.2