* testsuite/30_threads/thread/70503.cc: Adjust from xfail to pass.
authorJonathan Wakely <jwakely@redhat.com>
Thu, 7 Apr 2016 14:26:24 +0000 (15:26 +0100)
committerJonathan Wakely <redi@gcc.gnu.org>
Thu, 7 Apr 2016 14:26:24 +0000 (15:26 +0100)
From-SVN: r234808

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/30_threads/thread/70503.cc

index 2a3d7428a00158d209dd6eb71816c75123bd7632..48a13fa90a6e183f91ee85eaaf8700d371a020b4 100644 (file)
@@ -1,3 +1,7 @@
+2016-04-07  Jonathan Wakely  <jwakely@redhat.com>
+
+       * testsuite/30_threads/thread/70503.cc: Adjust from xfail to pass.
+
 2016-04-06  Eric Botcazou  <ebotcazou@adacore.com>
 
        * src/Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null.
index 950d75416ce0e6545734bab6a5801a78651f02e3..3b64ef8d2de8e84020ce3fb36ca0066ce0c640c7 100644 (file)
 // <http://www.gnu.org/licenses/>.
 
 // { dg-do link }
-// { dg-options " -std=gnu++11 -static" { target *-*-*gnu* } }
+// { dg-options "-std=gnu++11 -static" { target *-*-*gnu* } }
 // { dg-require-cstdint "" }
 // { dg-require-gthreads "" }
 // { dg-require-effective-target static }
 
+#include <thread>
+
 extern "C" {
-  void execute_native_thread_routine(void);
-  void execute_native_thread_routine_compat(void);
+  // Should not get multiple definition errors from libstdc++.a(thread.o)
+  void execute_native_thread_routine(void) { }
+  void execute_native_thread_routine_compat(void) { }
 }
 
 int main()
 {
-  execute_native_thread_routine(); // { dg-error "undefined reference" }
-  execute_native_thread_routine_compat(); // { dg-error "undefined reference" }
+  execute_native_thread_routine();
+  execute_native_thread_routine_compat();
+
+  std::thread{}.detach();  // ensure libstdc++.a(thread.o) is linked in
 }
-// { dg-prune-output "collect2: error: ld returned" }