From 371df5e92574fbc49cc266bd4f30238456016a49 Mon Sep 17 00:00:00 2001 From: redi Date: Thu, 7 Apr 2016 14:26:24 +0000 Subject: [PATCH] * testsuite/30_threads/thread/70503.cc: Adjust from xfail to pass. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@234808 138bc75d-0d04-0410-961f-82ee72b054a4 --- 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 2a3d7428a001..48a13fa90a6e 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 950d75416ce0..3b64ef8d2de8 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.47.3