From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1059) id 981CE395BC52; Tue, 12 May 2020 21:10:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 981CE395BC52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1589317847; bh=vlP2KlZQkKF/ttHTQlNDhjCVVdXdBnjzlX/l87/5NQY=; h=From:To:Subject:Date:From; b=nG5hAAVIL4G0KgjnRBfrnOtRHhh0Gz4WLaPZkXM4eZNyEiZd2EYqh/p/jR/pzHOYy vKBbVsAzCFKeE3zs8OXL3lXyDZop+s0Krs/cbutfszLPg70zEtudXZbsYOb/SvMDpL kjVWMJt7S85pwuh12WbbS76GlNm3WCU0Qx/OWJ2c= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Nathan Sidwell To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc/devel/c++-modules] Actually comment the new tests X-Act-Checkin: gcc X-Git-Author: Ulrich Drepper X-Git-Refname: refs/heads/devel/c++-modules X-Git-Oldrev: 491ba663e05887c0353edf571be36e8f04183df3 X-Git-Newrev: 7a2e715c9af2611040319f7139aee21054bcb8b7 Message-Id: <20200512211047.981CE395BC52@sourceware.org> Date: Tue, 12 May 2020 21:10:47 +0000 (GMT) X-BeenThere: libstdc++-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2020 21:10:47 -0000 https://gcc.gnu.org/g:7a2e715c9af2611040319f7139aee21054bcb8b7 commit 7a2e715c9af2611040319f7139aee21054bcb8b7 Author: Ulrich Drepper Date: Tue May 12 07:38:28 2020 +0200 Actually comment the new tests Diff: --- .../29_atomics/atomic_flag/test/explicit.cc | 32 ++++++++++++++++++++++ .../29_atomics/atomic_flag/test/implicit.cc | 32 ++++++++++++++++++++++ 2 files changed, 64 insertions(+) diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test/explicit.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test/explicit.cc new file mode 100644 index 00000000000..539656ba583 --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test/explicit.cc @@ -0,0 +1,32 @@ +// { dg-do run { target c++2a } } +// { dg-require-thread-fence "" } + +// Copyright (C) 2008-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include + +int main() +{ + using namespace std; + atomic_flag af = ATOMIC_FLAG_INIT; + + if (af.test(memory_order_acquire)) + af.clear(memory_order_release); + + return 0; +} diff --git a/libstdc++-v3/testsuite/29_atomics/atomic_flag/test/implicit.cc b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test/implicit.cc new file mode 100644 index 00000000000..11d29ac0b9e --- /dev/null +++ b/libstdc++-v3/testsuite/29_atomics/atomic_flag/test/implicit.cc @@ -0,0 +1,32 @@ +// { dg-do run { target c++2a } } +// { dg-require-thread-fence "" } + +// Copyright (C) 2008-2020 Free Software Foundation, Inc. +// +// This file is part of the GNU ISO C++ Library. This library is free +// software; you can redistribute it and/or modify it under the +// terms of the GNU General Public License as published by the +// Free Software Foundation; either version 3, or (at your option) +// any later version. + +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License along +// with this library; see the file COPYING3. If not see +// . + +#include + +int main() +{ + using namespace std; + atomic_flag af = ATOMIC_FLAG_INIT; + + if (af.test()) + af.clear(); + + return 0; +}