Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
ccfe77fa
Commit
ccfe77fa
authored
Jul 26, 2018
by
Marek Polacek
Committed by
Marek Polacek
Jul 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* 30_threads/condition_variable_any/cond.cc: New test.
From-SVN: r263022
parent
2686c842
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
libstdc++-v3/ChangeLog
+4
-0
libstdc++-v3/testsuite/30_threads/condition_variable_any/cond.cc
+35
-0
No files found.
libstdc++-v3/ChangeLog
View file @
ccfe77fa
2018-07-26 Marek Polacek <polacek@redhat.com>
* testsuite/30_threads/condition_variable_any/cond.cc: New.
2018-07-26 Marek Polacek <polacek@redhat.com>
* src/c++98/locale_init.cc: Fix #ifdef condition.
2018-07-26 Jonathan Wakely <jwakely@redhat.com>
...
...
libstdc++-v3/testsuite/30_threads/condition_variable_any/cond.cc
0 → 100644
View file @
ccfe77fa
// { dg-do run }
// { dg-options "-pthread" }
// { dg-require-effective-target c++11 }
// { dg-require-effective-target pthread }
// { dg-require-gthreads "" }
// Copyright (C) 2018 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
// <http://www.gnu.org/licenses/>.
#include <condition_variable>
#include <cstring>
int
main
()
{
const
size_t
sz
=
sizeof
(
std
::
condition_variable_any
);
char
garbage
[
sz
];
memset
(
garbage
,
0xff
,
sz
);
auto
cond
=
new
((
void
*
)
garbage
)
std
::
condition_variable_any
();
cond
->
notify_all
();
cond
->~
condition_variable_any
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment