]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libstdc++-v3/testsuite/30_threads/shared_lock/locking/4.cc
Update copyright years.
[thirdparty/gcc.git] / libstdc++-v3 / testsuite / 30_threads / shared_lock / locking / 4.cc
index a2e1588bf53a73695b6b622c8a696a9112d9ef11..8f049c4fc00889b0bf225b47b47d716b2a4715bb 100644 (file)
@@ -1,11 +1,9 @@
-// { dg-do run { target *-*-freebsd* *-*-netbsd* *-*-linux* *-*-solaris* *-*-cygwin *-*-darwin* powerpc-ibm-aix* } }
-// { dg-options " -std=gnu++1y -pthread" { target *-*-freebsd* *-*-netbsd* *-*-linux* powerpc-ibm-aix* } }
-// { dg-options " -std=gnu++1y -pthreads" { target *-*-solaris* } }
-// { dg-options " -std=gnu++1y " { target *-*-cygwin *-*-darwin* } }
-// { dg-require-cstdint "" }
-// { dg-require-gthreads-timed "" }
+// { dg-do run }
+// { dg-additional-options "-pthread" { target pthread } }
+// { dg-require-effective-target c++14 }
+// { dg-require-gthreads "" }
 
-// Copyright (C) 2013-2014 Free Software Foundation, Inc.
+// Copyright (C) 2013-2024 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
@@ -30,8 +28,7 @@
 
 int main()
 {
-  bool test __attribute__((unused)) = true;
-  typedef std::shared_mutex mutex_type;
+  typedef std::shared_timed_mutex mutex_type;
   typedef std::shared_lock<mutex_type> lock_type;
   typedef std::chrono::system_clock clock_type;
 
@@ -43,7 +40,7 @@ int main()
 
       try
        {
-         l.try_lock_until(t);
+         (void) l.try_lock_until(t);
        }
       catch(const std::system_error&)
        {