From 6da8b9316327f32cf907e020a9c6a6b9c643b465 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Thu, 7 Apr 2016 15:26:24 +0100 Subject: [PATCH] * testsuite/30_threads/thread/70503.cc: Adjust from xfail to pass. From-SVN: r234808 --- libstdc++-v3/ChangeLog | 4 ++++ .../testsuite/30_threads/thread/70503.cc | 16 ++++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 2a3d7428a00..48a13fa90a6 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,7 @@ +2016-04-07 Jonathan Wakely + + * testsuite/30_threads/thread/70503.cc: Adjust from xfail to pass. + 2016-04-06 Eric Botcazou * src/Makefile.am (libstdc++-symbols.ver): Remove useless /dev/null. diff --git a/libstdc++-v3/testsuite/30_threads/thread/70503.cc b/libstdc++-v3/testsuite/30_threads/thread/70503.cc index 950d75416ce..3b64ef8d2de 100644 --- a/libstdc++-v3/testsuite/30_threads/thread/70503.cc +++ b/libstdc++-v3/testsuite/30_threads/thread/70503.cc @@ -16,19 +16,23 @@ // . // { 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 + 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" } -- 2.30.2