From 3d838e28ddfa7bbfc642488cbe973e5e1981e9c1 Mon Sep 17 00:00:00 2001
From: Benjamin Kosnik <bkoz@gcc.gnu.org>
Date: Tue, 15 Apr 2003 06:36:31 +0000
Subject: [PATCH] [multiple changes]

2003-04-14  Andreas Tobler  <toa@pop.agri.ch>
 	    Benjamin Kosnik  <bkoz@redhat.com>

	* config/os/generic/ctype_inline.h: Fix.

2003-04-14  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/testsuite_hooks.h
	(__gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher):
	Change to run_named_locale_test.
	* testsuite/testsuite_hooks.cc (__gnu_cxx_test): Same.

	* testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc: Use
	run_test_named_locale.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/encoding/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/encoding/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/encoding/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/7.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/8.cc: Same.
	* testsuite/22_locale/codecvt/in/wchar_t/9.cc: Same.
	* testsuite/22_locale/codecvt/length/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/length/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/length/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/length/wchar_t/7.cc: Same.
	* testsuite/22_locale/codecvt/max_length/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/max_length/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/max_length/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/out/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/out/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/out/wchar_t/4.cc: Same.
	* testsuite/22_locale/codecvt/out/wchar_t/7.cc: Same.
	* testsuite/22_locale/codecvt/unshift/wchar_t/2.cc: Same.
	* testsuite/22_locale/codecvt/unshift/wchar_t/3.cc: Same.
	* testsuite/22_locale/codecvt/unshift/wchar_t/4.cc: Same.
	* testsuite/22_locale/collate/compare/char/1.cc: Same.
	* testsuite/22_locale/collate/compare/char/2.cc: Same.
	* testsuite/22_locale/collate/compare/char/3.cc: Same.
	* testsuite/22_locale/collate/compare/wchar_t/1.cc: Same.
	* testsuite/22_locale/collate/compare/wchar_t/2.cc: Same.
	* testsuite/22_locale/collate/compare/wchar_t/3.cc: Same.
	* testsuite/22_locale/collate/hash/char/2.cc: Same.
	* testsuite/22_locale/collate/hash/wchar_t/2.cc: Same.
	* testsuite/22_locale/collate/transform/char/2.cc: Same.
	* testsuite/22_locale/collate/transform/char/3.cc: Same.
	* testsuite/22_locale/collate/transform/wchar_t/2.cc: Same.
	* testsuite/22_locale/collate/transform/wchar_t/3.cc: Same.
	* testsuite/22_locale/collate_byname/1.cc: Same.
	* testsuite/22_locale/ctype/is/char/2.cc: Same.
	* testsuite/22_locale/ctype/is/wchar_t/2.cc: Same.
	* testsuite/22_locale/ctype/narrow/wchar_t/3.cc: Same.
	* testsuite/22_locale/ctype/widen/wchar_t/2.cc: Same.
	* testsuite/22_locale/ctype/widen/wchar_t/3.cc: Same.
	* testsuite/22_locale/facet/2.cc: Same.
	* testsuite/22_locale/locale/cons/2.cc: Same.
	* testsuite/22_locale/locale/cons/4.cc: Same.
	* testsuite/22_locale/locale/cons/5.cc: Same.
	* testsuite/22_locale/locale/cons/7.cc: Same.
	* testsuite/22_locale/locale/cons/7222-c.cc: Same.
	* testsuite/22_locale/locale/cons/7222-env.cc: Same.
	* testsuite/22_locale/locale/global_locale_objects/2.cc: Same.
	* testsuite/22_locale/messages/members/char/1.cc: Same.
	* testsuite/22_locale/messages/members/char/2.cc: Same.
	* testsuite/22_locale/messages/members/char/3.cc: Same.
	* testsuite/22_locale/messages_byname/1.cc: Same.
	* testsuite/22_locale/money_get/get/char/1.cc: Same.
	* testsuite/22_locale/money_get/get/char/2.cc: Same.
	* testsuite/22_locale/money_get/get/char/3.cc: Same.
	* testsuite/22_locale/money_get/get/char/4.cc: Same.
	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Same.
	* testsuite/22_locale/money_get/get/wchar_t/2.cc: Same.
	* testsuite/22_locale/money_get/get/wchar_t/3.cc: Same.
	* testsuite/22_locale/money_get/get/wchar_t/4.cc: Same.
	* testsuite/22_locale/money_put/put/char/1.cc: Same.
	* testsuite/22_locale/money_put/put/char/2.cc: Same.
	* testsuite/22_locale/money_put/put/char/3.cc: Same.
	* testsuite/22_locale/money_put/put/wchar_t/1.cc: Same.
	* testsuite/22_locale/money_put/put/wchar_t/2.cc: Same.
	* testsuite/22_locale/money_put/put/wchar_t/3.cc: Same.
	* testsuite/22_locale/moneypunct/members/char/2.cc: Same.
	* testsuite/22_locale/moneypunct/members/wchar_t/2.cc: Same.
	* testsuite/22_locale/moneypunct_byname/1.cc: Same.
	* testsuite/22_locale/num_get/get/char/1.cc: Same.
	* testsuite/22_locale/num_get/get/char/2.cc: Same.
	* testsuite/22_locale/num_get/get/char/3.cc: Same.
	* testsuite/22_locale/num_get/get/char/5.cc: Same.
	* testsuite/22_locale/num_get/get/char/6.cc: Same.
	* testsuite/22_locale/num_get/get/wchar_t/1.cc: Same.
	* testsuite/22_locale/num_get/get/wchar_t/2.cc: Same.
	* testsuite/22_locale/num_get/get/wchar_t/3.cc: Same.
	* testsuite/22_locale/num_get/get/wchar_t/5.cc: Same.
	* testsuite/22_locale/num_get/get/wchar_t/6.cc: Same.
	* testsuite/22_locale/num_put/put/char/1.cc: Same.
	* testsuite/22_locale/num_put/put/char/2.cc: Same.
	* testsuite/22_locale/num_put/put/char/3.cc: Same.
	* testsuite/22_locale/num_put/put/char/5.cc: Same.
	* testsuite/22_locale/num_put/put/wchar_t/1.cc: Same.
	* testsuite/22_locale/num_put/put/wchar_t/2.cc: Same.
	* testsuite/22_locale/num_put/put/wchar_t/3.cc: Same.
	* testsuite/22_locale/num_put/put/wchar_t/5.cc: Same.
	* testsuite/22_locale/numpunct/members/char/1.cc: Same.
	* testsuite/22_locale/numpunct/members/char/2.cc: Same.
	* testsuite/22_locale/numpunct/members/wchar_t/1.cc: Same.
	* testsuite/22_locale/numpunct/members/wchar_t/2.cc: Same.
	* testsuite/22_locale/numpunct_byname/1.cc: Same.
	* testsuite/22_locale/numpunct_byname/2.cc: Same.
	* testsuite/22_locale/time_get/date_order/char/1.cc: Same.
	* testsuite/22_locale/time_get/date_order/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_get/get_date/char/1.cc: Same.
	* testsuite/22_locale/time_get/get_date/char/2.cc: Same.
	* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Same.
	* testsuite/22_locale/time_get/get_monthname/char/1.cc: Same.
	* testsuite/22_locale/time_get/get_monthname/char/2.cc: Same.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Same.
	* testsuite/22_locale/time_get/get_time/char/1.cc: Same.
	* testsuite/22_locale/time_get/get_time/char/2.cc: Same.
	* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Same.
	* testsuite/22_locale/time_get/get_weekday/char/1.cc: Same.
	* testsuite/22_locale/time_get/get_weekday/char/2.cc: Same.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Same.
	* testsuite/22_locale/time_get/get_year/char/1.cc: Same.
	* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_put/put/char/1.cc: Same.
	* testsuite/22_locale/time_put/put/char/2.cc: Same.
	* testsuite/22_locale/time_put/put/char/3.cc: Same.
	* testsuite/22_locale/time_put/put/char/4.cc: Same.
	* testsuite/22_locale/time_put/put/char/5.cc: Same.
	* testsuite/22_locale/time_put/put/char/6.cc: Same.
	* testsuite/22_locale/time_put/put/char/7.cc: Same.
	* testsuite/22_locale/time_put/put/char/8.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/1.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/2.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/3.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/4.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/5.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/6.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/7.cc: Same.
	* testsuite/22_locale/time_put/put/wchar_t/8.cc: Same.
	* testsuite/27_io/basic_filebuf/imbue/char/9322.cc: Same.
	* testsuite/27_io/basic_ios/copyfmt/char/2.cc: Same.
	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc: Same.
	* testsuite/27_io/basic_streambuf/imbue/char/9322.cc: Same.
	* testsuite/27_io/basic_stringbuf/imbue/char/9322.cc: Same.

2003-04-14  Andreas Tobler  <toa@pop.agri.ch>

	* configure.target (_cpu_incdir_fullpath): Solaris 2.9 uses
	solaris includes, not generic.

From-SVN: r65622
---
 libstdc++-v3/ChangeLog                        | 157 ++++++++++++++++++
 .../config/locale/generic/c_locale.cc         |   4 +-
 libstdc++-v3/config/os/generic/ctype_inline.h | 142 ++++++++++------
 libstdc++-v3/configure.target                 |   2 +-
 .../codecvt/always_noconv/wchar_t/2.cc        |   2 +-
 .../codecvt/always_noconv/wchar_t/3.cc        |   2 +-
 .../codecvt/always_noconv/wchar_t/4.cc        |   2 +-
 .../22_locale/codecvt/encoding/wchar_t/2.cc   |   2 +-
 .../22_locale/codecvt/encoding/wchar_t/3.cc   |   2 +-
 .../22_locale/codecvt/encoding/wchar_t/4.cc   |   2 +-
 .../22_locale/codecvt/in/wchar_t/2.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/3.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/4.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/7.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/8.cc         |   2 +-
 .../22_locale/codecvt/in/wchar_t/9.cc         |   2 +-
 .../22_locale/codecvt/length/wchar_t/2.cc     |   2 +-
 .../22_locale/codecvt/length/wchar_t/3.cc     |   2 +-
 .../22_locale/codecvt/length/wchar_t/4.cc     |   2 +-
 .../22_locale/codecvt/length/wchar_t/7.cc     |   2 +-
 .../22_locale/codecvt/max_length/wchar_t/2.cc |   2 +-
 .../22_locale/codecvt/max_length/wchar_t/3.cc |   2 +-
 .../22_locale/codecvt/max_length/wchar_t/4.cc |   2 +-
 .../22_locale/codecvt/out/wchar_t/2.cc        |   2 +-
 .../22_locale/codecvt/out/wchar_t/3.cc        |   2 +-
 .../22_locale/codecvt/out/wchar_t/4.cc        |   2 +-
 .../22_locale/codecvt/out/wchar_t/7.cc        |   2 +-
 .../22_locale/codecvt/unshift/wchar_t/2.cc    |   2 +-
 .../22_locale/codecvt/unshift/wchar_t/3.cc    |   2 +-
 .../22_locale/codecvt/unshift/wchar_t/4.cc    |   2 +-
 .../22_locale/collate/compare/char/1.cc       |   8 +-
 .../22_locale/collate/compare/char/2.cc       |   8 +-
 .../22_locale/collate/compare/char/3.cc       |   4 +-
 .../22_locale/collate/compare/wchar_t/1.cc    |   6 +-
 .../22_locale/collate/compare/wchar_t/2.cc    |   6 +-
 .../22_locale/collate/compare/wchar_t/3.cc    |   2 +-
 .../22_locale/collate/hash/char/2.cc          |   8 +-
 .../22_locale/collate/hash/wchar_t/2.cc       |   6 +-
 .../22_locale/collate/transform/char/2.cc     |   8 +-
 .../22_locale/collate/transform/char/3.cc     |   4 +-
 .../22_locale/collate/transform/wchar_t/2.cc  |   6 +-
 .../22_locale/collate/transform/wchar_t/3.cc  |   2 +-
 .../testsuite/22_locale/collate_byname/1.cc   |   8 +-
 .../testsuite/22_locale/ctype/is/char/2.cc    |   4 +-
 .../testsuite/22_locale/ctype/is/wchar_t/2.cc |   2 +-
 .../22_locale/ctype/narrow/wchar_t/3.cc       |   2 +-
 .../22_locale/ctype/widen/wchar_t/2.cc        |   2 +-
 .../22_locale/ctype/widen/wchar_t/3.cc        |   2 +-
 libstdc++-v3/testsuite/22_locale/facet/2.cc   |   4 +-
 .../testsuite/22_locale/locale/cons/2.cc      |   4 +-
 .../testsuite/22_locale/locale/cons/4.cc      |   4 +-
 .../testsuite/22_locale/locale/cons/5.cc      |  16 +-
 .../testsuite/22_locale/locale/cons/7.cc      |   4 +-
 .../testsuite/22_locale/locale/cons/7222-c.cc |   2 +-
 .../22_locale/locale/cons/7222-env.cc         |   6 +-
 .../locale/global_locale_objects/2.cc         |   8 +-
 .../22_locale/messages/members/char/1.cc      |   8 +-
 .../22_locale/messages/members/char/2.cc      |   8 +-
 .../22_locale/messages/members/char/3.cc      |   8 +-
 .../testsuite/22_locale/messages_byname/1.cc  |   8 +-
 .../22_locale/money_get/get/char/1.cc         |   8 +-
 .../22_locale/money_get/get/char/2.cc         |   8 +-
 .../22_locale/money_get/get/char/3.cc         |   8 +-
 .../22_locale/money_get/get/char/4.cc         |   8 +-
 .../22_locale/money_get/get/wchar_t/1.cc      |   6 +-
 .../22_locale/money_get/get/wchar_t/2.cc      |   6 +-
 .../22_locale/money_get/get/wchar_t/3.cc      |   6 +-
 .../22_locale/money_get/get/wchar_t/4.cc      |   6 +-
 .../22_locale/money_put/put/char/1.cc         |   8 +-
 .../22_locale/money_put/put/char/2.cc         |   8 +-
 .../22_locale/money_put/put/char/3.cc         |   8 +-
 .../22_locale/money_put/put/wchar_t/1.cc      |   6 +-
 .../22_locale/money_put/put/wchar_t/2.cc      |   6 +-
 .../22_locale/money_put/put/wchar_t/3.cc      |   6 +-
 .../22_locale/moneypunct/members/char/2.cc    |   4 +-
 .../22_locale/moneypunct/members/wchar_t/2.cc |   2 +-
 .../22_locale/moneypunct_byname/1.cc          |   9 +-
 .../testsuite/22_locale/num_get/get/char/1.cc |   8 +-
 .../testsuite/22_locale/num_get/get/char/2.cc |   8 +-
 .../testsuite/22_locale/num_get/get/char/3.cc |   8 +-
 .../testsuite/22_locale/num_get/get/char/5.cc |   4 +-
 .../testsuite/22_locale/num_get/get/char/6.cc |   4 +-
 .../22_locale/num_get/get/wchar_t/1.cc        |   6 +-
 .../22_locale/num_get/get/wchar_t/2.cc        |   6 +-
 .../22_locale/num_get/get/wchar_t/3.cc        |   6 +-
 .../22_locale/num_get/get/wchar_t/5.cc        |   2 +-
 .../22_locale/num_get/get/wchar_t/6.cc        |   2 +-
 .../testsuite/22_locale/num_put/put/char/1.cc |   8 +-
 .../testsuite/22_locale/num_put/put/char/2.cc |   8 +-
 .../testsuite/22_locale/num_put/put/char/3.cc |   8 +-
 .../testsuite/22_locale/num_put/put/char/5.cc |   4 +-
 .../22_locale/num_put/put/wchar_t/1.cc        |   6 +-
 .../22_locale/num_put/put/wchar_t/2.cc        |   6 +-
 .../22_locale/num_put/put/wchar_t/3.cc        |   6 +-
 .../22_locale/num_put/put/wchar_t/5.cc        |   2 +-
 .../22_locale/numpunct/members/char/1.cc      |   8 +-
 .../22_locale/numpunct/members/char/2.cc      |   8 +-
 .../22_locale/numpunct/members/wchar_t/1.cc   |   6 +-
 .../22_locale/numpunct/members/wchar_t/2.cc   |   6 +-
 .../testsuite/22_locale/numpunct_byname/1.cc  |   8 +-
 .../testsuite/22_locale/numpunct_byname/2.cc  |   4 +-
 .../22_locale/time_get/date_order/char/1.cc   |   8 +-
 .../time_get/date_order/wchar_t/1.cc          |   6 +-
 .../22_locale/time_get/get_date/char/1.cc     |   8 +-
 .../22_locale/time_get/get_date/char/2.cc     |   8 +-
 .../22_locale/time_get/get_date/wchar_t/1.cc  |   6 +-
 .../22_locale/time_get/get_date/wchar_t/2.cc  |   6 +-
 .../time_get/get_monthname/char/1.cc          |   8 +-
 .../time_get/get_monthname/char/2.cc          |   8 +-
 .../time_get/get_monthname/wchar_t/1.cc       |   6 +-
 .../time_get/get_monthname/wchar_t/2.cc       |   6 +-
 .../22_locale/time_get/get_time/char/1.cc     |   8 +-
 .../22_locale/time_get/get_time/char/2.cc     |   8 +-
 .../22_locale/time_get/get_time/wchar_t/1.cc  |   6 +-
 .../22_locale/time_get/get_time/wchar_t/2.cc  |   6 +-
 .../22_locale/time_get/get_weekday/char/1.cc  |   8 +-
 .../22_locale/time_get/get_weekday/char/2.cc  |   8 +-
 .../time_get/get_weekday/wchar_t/1.cc         |   6 +-
 .../time_get/get_weekday/wchar_t/2.cc         |   6 +-
 .../22_locale/time_get/get_year/char/1.cc     |   8 +-
 .../22_locale/time_get/get_year/wchar_t/1.cc  |   6 +-
 .../22_locale/time_put/put/char/1.cc          |   8 +-
 .../22_locale/time_put/put/char/2.cc          |   8 +-
 .../22_locale/time_put/put/char/3.cc          |   8 +-
 .../22_locale/time_put/put/char/4.cc          |   8 +-
 .../22_locale/time_put/put/char/5.cc          |   8 +-
 .../22_locale/time_put/put/char/6.cc          |   8 +-
 .../22_locale/time_put/put/char/7.cc          |   8 +-
 .../22_locale/time_put/put/char/8.cc          |   8 +-
 .../22_locale/time_put/put/wchar_t/1.cc       |   6 +-
 .../22_locale/time_put/put/wchar_t/2.cc       |   6 +-
 .../22_locale/time_put/put/wchar_t/3.cc       |   6 +-
 .../22_locale/time_put/put/wchar_t/4.cc       |   6 +-
 .../22_locale/time_put/put/wchar_t/5.cc       |   6 +-
 .../22_locale/time_put/put/wchar_t/6.cc       |   6 +-
 .../22_locale/time_put/put/wchar_t/7.cc       |   6 +-
 .../22_locale/time_put/put/wchar_t/8.cc       |   6 +-
 .../27_io/basic_filebuf/imbue/char/9322.cc    |   6 +-
 .../27_io/basic_ios/copyfmt/char/2.cc         |   4 +-
 .../inserters_arithmetic/char/2.cc            |   4 +-
 .../27_io/basic_streambuf/imbue/char/9322.cc  |   6 +-
 .../27_io/basic_stringbuf/imbue/char/9322.cc  |   6 +-
 libstdc++-v3/testsuite/testsuite_hooks.cc     |  49 ++----
 libstdc++-v3/testsuite/testsuite_hooks.h      |   7 +-
 144 files changed, 643 insertions(+), 471 deletions(-)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 9d14062f988d..57bac9cc2560 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,160 @@
+2003-04-14  Andreas Tobler  <toa@pop.agri.ch>
+ 	    Benjamin Kosnik  <bkoz@redhat.com>
+
+	* config/os/generic/ctype_inline.h: Fix.
+	
+2003-04-14  Benjamin Kosnik  <bkoz@redhat.com>
+	
+	* testsuite/testsuite_hooks.h
+	(__gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher):
+	Change to run_named_locale_test.
+	* testsuite/testsuite_hooks.cc (__gnu_cxx_test): Same.
+
+	* testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc: Use
+	run_test_named_locale.
+	* testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc: Same.
+	* testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc: Same.
+	* testsuite/22_locale/codecvt/encoding/wchar_t/2.cc: Same.
+	* testsuite/22_locale/codecvt/encoding/wchar_t/3.cc: Same.
+	* testsuite/22_locale/codecvt/encoding/wchar_t/4.cc: Same.
+	* testsuite/22_locale/codecvt/in/wchar_t/2.cc: Same.
+	* testsuite/22_locale/codecvt/in/wchar_t/3.cc: Same.
+	* testsuite/22_locale/codecvt/in/wchar_t/4.cc: Same.
+	* testsuite/22_locale/codecvt/in/wchar_t/7.cc: Same.
+	* testsuite/22_locale/codecvt/in/wchar_t/8.cc: Same.
+	* testsuite/22_locale/codecvt/in/wchar_t/9.cc: Same.
+	* testsuite/22_locale/codecvt/length/wchar_t/2.cc: Same.
+	* testsuite/22_locale/codecvt/length/wchar_t/3.cc: Same.
+	* testsuite/22_locale/codecvt/length/wchar_t/4.cc: Same.
+	* testsuite/22_locale/codecvt/length/wchar_t/7.cc: Same.
+	* testsuite/22_locale/codecvt/max_length/wchar_t/2.cc: Same.
+	* testsuite/22_locale/codecvt/max_length/wchar_t/3.cc: Same.
+	* testsuite/22_locale/codecvt/max_length/wchar_t/4.cc: Same.
+	* testsuite/22_locale/codecvt/out/wchar_t/2.cc: Same.
+	* testsuite/22_locale/codecvt/out/wchar_t/3.cc: Same.
+	* testsuite/22_locale/codecvt/out/wchar_t/4.cc: Same.
+	* testsuite/22_locale/codecvt/out/wchar_t/7.cc: Same.
+	* testsuite/22_locale/codecvt/unshift/wchar_t/2.cc: Same.
+	* testsuite/22_locale/codecvt/unshift/wchar_t/3.cc: Same.
+	* testsuite/22_locale/codecvt/unshift/wchar_t/4.cc: Same.
+	* testsuite/22_locale/collate/compare/char/1.cc: Same.
+	* testsuite/22_locale/collate/compare/char/2.cc: Same.
+	* testsuite/22_locale/collate/compare/char/3.cc: Same.
+	* testsuite/22_locale/collate/compare/wchar_t/1.cc: Same.
+	* testsuite/22_locale/collate/compare/wchar_t/2.cc: Same.
+	* testsuite/22_locale/collate/compare/wchar_t/3.cc: Same.
+	* testsuite/22_locale/collate/hash/char/2.cc: Same.
+	* testsuite/22_locale/collate/hash/wchar_t/2.cc: Same.
+	* testsuite/22_locale/collate/transform/char/2.cc: Same.
+	* testsuite/22_locale/collate/transform/char/3.cc: Same.
+	* testsuite/22_locale/collate/transform/wchar_t/2.cc: Same.
+	* testsuite/22_locale/collate/transform/wchar_t/3.cc: Same.
+	* testsuite/22_locale/collate_byname/1.cc: Same.
+	* testsuite/22_locale/ctype/is/char/2.cc: Same.
+	* testsuite/22_locale/ctype/is/wchar_t/2.cc: Same.
+	* testsuite/22_locale/ctype/narrow/wchar_t/3.cc: Same.
+	* testsuite/22_locale/ctype/widen/wchar_t/2.cc: Same.
+	* testsuite/22_locale/ctype/widen/wchar_t/3.cc: Same.
+	* testsuite/22_locale/facet/2.cc: Same.
+	* testsuite/22_locale/locale/cons/2.cc: Same.
+	* testsuite/22_locale/locale/cons/4.cc: Same.
+	* testsuite/22_locale/locale/cons/5.cc: Same.
+	* testsuite/22_locale/locale/cons/7.cc: Same.
+	* testsuite/22_locale/locale/cons/7222-c.cc: Same.
+	* testsuite/22_locale/locale/cons/7222-env.cc: Same.
+	* testsuite/22_locale/locale/global_locale_objects/2.cc: Same.
+	* testsuite/22_locale/messages/members/char/1.cc: Same.
+	* testsuite/22_locale/messages/members/char/2.cc: Same.
+	* testsuite/22_locale/messages/members/char/3.cc: Same.
+	* testsuite/22_locale/messages_byname/1.cc: Same.
+	* testsuite/22_locale/money_get/get/char/1.cc: Same.
+	* testsuite/22_locale/money_get/get/char/2.cc: Same.
+	* testsuite/22_locale/money_get/get/char/3.cc: Same.
+	* testsuite/22_locale/money_get/get/char/4.cc: Same.
+	* testsuite/22_locale/money_get/get/wchar_t/1.cc: Same.
+	* testsuite/22_locale/money_get/get/wchar_t/2.cc: Same.
+	* testsuite/22_locale/money_get/get/wchar_t/3.cc: Same.
+	* testsuite/22_locale/money_get/get/wchar_t/4.cc: Same.
+	* testsuite/22_locale/money_put/put/char/1.cc: Same.
+	* testsuite/22_locale/money_put/put/char/2.cc: Same.
+	* testsuite/22_locale/money_put/put/char/3.cc: Same.
+	* testsuite/22_locale/money_put/put/wchar_t/1.cc: Same.
+	* testsuite/22_locale/money_put/put/wchar_t/2.cc: Same.
+	* testsuite/22_locale/money_put/put/wchar_t/3.cc: Same.
+	* testsuite/22_locale/moneypunct/members/char/2.cc: Same.
+	* testsuite/22_locale/moneypunct/members/wchar_t/2.cc: Same.
+	* testsuite/22_locale/moneypunct_byname/1.cc: Same.
+	* testsuite/22_locale/num_get/get/char/1.cc: Same.
+	* testsuite/22_locale/num_get/get/char/2.cc: Same.
+	* testsuite/22_locale/num_get/get/char/3.cc: Same.
+	* testsuite/22_locale/num_get/get/char/5.cc: Same.
+	* testsuite/22_locale/num_get/get/char/6.cc: Same.
+	* testsuite/22_locale/num_get/get/wchar_t/1.cc: Same.
+	* testsuite/22_locale/num_get/get/wchar_t/2.cc: Same.
+	* testsuite/22_locale/num_get/get/wchar_t/3.cc: Same.
+	* testsuite/22_locale/num_get/get/wchar_t/5.cc: Same.
+	* testsuite/22_locale/num_get/get/wchar_t/6.cc: Same.
+	* testsuite/22_locale/num_put/put/char/1.cc: Same.
+	* testsuite/22_locale/num_put/put/char/2.cc: Same.
+	* testsuite/22_locale/num_put/put/char/3.cc: Same.
+	* testsuite/22_locale/num_put/put/char/5.cc: Same.
+	* testsuite/22_locale/num_put/put/wchar_t/1.cc: Same.
+	* testsuite/22_locale/num_put/put/wchar_t/2.cc: Same.
+	* testsuite/22_locale/num_put/put/wchar_t/3.cc: Same.
+	* testsuite/22_locale/num_put/put/wchar_t/5.cc: Same.
+	* testsuite/22_locale/numpunct/members/char/1.cc: Same.
+	* testsuite/22_locale/numpunct/members/char/2.cc: Same.
+	* testsuite/22_locale/numpunct/members/wchar_t/1.cc: Same.
+	* testsuite/22_locale/numpunct/members/wchar_t/2.cc: Same.
+	* testsuite/22_locale/numpunct_byname/1.cc: Same.
+	* testsuite/22_locale/numpunct_byname/2.cc: Same.
+	* testsuite/22_locale/time_get/date_order/char/1.cc: Same.
+	* testsuite/22_locale/time_get/date_order/wchar_t/1.cc: Same.
+	* testsuite/22_locale/time_get/get_date/char/1.cc: Same.
+	* testsuite/22_locale/time_get/get_date/char/2.cc: Same.
+	* testsuite/22_locale/time_get/get_date/wchar_t/1.cc: Same.
+	* testsuite/22_locale/time_get/get_date/wchar_t/2.cc: Same.
+	* testsuite/22_locale/time_get/get_monthname/char/1.cc: Same.
+	* testsuite/22_locale/time_get/get_monthname/char/2.cc: Same.
+	* testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc: Same.
+	* testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc: Same.
+	* testsuite/22_locale/time_get/get_time/char/1.cc: Same.
+	* testsuite/22_locale/time_get/get_time/char/2.cc: Same.
+	* testsuite/22_locale/time_get/get_time/wchar_t/1.cc: Same.
+	* testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Same.
+	* testsuite/22_locale/time_get/get_weekday/char/1.cc: Same.
+	* testsuite/22_locale/time_get/get_weekday/char/2.cc: Same.
+	* testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc: Same.
+	* testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc: Same.
+	* testsuite/22_locale/time_get/get_year/char/1.cc: Same.
+	* testsuite/22_locale/time_get/get_year/wchar_t/1.cc: Same.
+	* testsuite/22_locale/time_put/put/char/1.cc: Same.
+	* testsuite/22_locale/time_put/put/char/2.cc: Same.
+	* testsuite/22_locale/time_put/put/char/3.cc: Same.
+	* testsuite/22_locale/time_put/put/char/4.cc: Same.
+	* testsuite/22_locale/time_put/put/char/5.cc: Same.
+	* testsuite/22_locale/time_put/put/char/6.cc: Same.
+	* testsuite/22_locale/time_put/put/char/7.cc: Same.
+	* testsuite/22_locale/time_put/put/char/8.cc: Same.
+	* testsuite/22_locale/time_put/put/wchar_t/1.cc: Same.
+	* testsuite/22_locale/time_put/put/wchar_t/2.cc: Same.
+	* testsuite/22_locale/time_put/put/wchar_t/3.cc: Same.
+	* testsuite/22_locale/time_put/put/wchar_t/4.cc: Same.
+	* testsuite/22_locale/time_put/put/wchar_t/5.cc: Same.
+	* testsuite/22_locale/time_put/put/wchar_t/6.cc: Same.
+	* testsuite/22_locale/time_put/put/wchar_t/7.cc: Same.
+	* testsuite/22_locale/time_put/put/wchar_t/8.cc: Same.
+	* testsuite/27_io/basic_filebuf/imbue/char/9322.cc: Same.
+	* testsuite/27_io/basic_ios/copyfmt/char/2.cc: Same.
+	* testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc: Same.
+	* testsuite/27_io/basic_streambuf/imbue/char/9322.cc: Same.
+	* testsuite/27_io/basic_stringbuf/imbue/char/9322.cc: Same.
+	
+2003-04-14  Andreas Tobler  <toa@pop.agri.ch>
+ 	    
+	* configure.target (_cpu_incdir_fullpath): Solaris 2.9 uses
+	solaris includes, not generic.
+
 2003-04-14  Loren J. Rittle  <ljrittle@acm.org>
 
 	* testsuite/26_numerics/c99_classification_macros_c.cc: Add XFAIL.
diff --git a/libstdc++-v3/config/locale/generic/c_locale.cc b/libstdc++-v3/config/locale/generic/c_locale.cc
index 13bc21aa046b..48d406f2558b 100644
--- a/libstdc++-v3/config/locale/generic/c_locale.cc
+++ b/libstdc++-v3/config/locale/generic/c_locale.cc
@@ -1,6 +1,6 @@
 // Wrapper for underlying C-language localization -*- C++ -*-
 
-// Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002, 2003 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
@@ -216,7 +216,7 @@ namespace std
 				    __c_locale)
   {
     __cloc = NULL;
-    if (strcmp (__s, "C"))
+    if (strcmp(__s, "C"))
       __throw_runtime_error("attempt to create locale from unhandled name in generic implementation; see http://gcc.gnu.org/ml/libstdc++/2003-02/msg00345.html");
   }
 
diff --git a/libstdc++-v3/config/os/generic/ctype_inline.h b/libstdc++-v3/config/os/generic/ctype_inline.h
index c10cb565b76c..be43c47fd0a8 100644
--- a/libstdc++-v3/config/os/generic/ctype_inline.h
+++ b/libstdc++-v3/config/os/generic/ctype_inline.h
@@ -1,6 +1,6 @@
 // Locale support -*- C++ -*-
 
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2003 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
@@ -39,69 +39,95 @@
 // functionality should be added for the native os in question: see
 // the config/os/bits/ctype_*.h files.
 
+// Constructing a synthetic "C" table should be seriously considered...
+
   bool
   ctype<char>::
   is(mask __m, char __c) const
   { 
-    bool __ret;
-    switch (__m)
+    if (_M_table)
+      return _M_table[static_cast<unsigned char>(__c)] & __m;
+    else
       {
-      case space:
-	__ret = isspace(__c);
-	break;
-      case print:
-	__ret = isprint(__c);
-	break;
-      case cntrl:
-	__ret = iscntrl(__c);
-	break;
-      case upper:
-	__ret = isupper(__c);
-	break;
-      case lower:
-	__ret = islower(__c);
-	break;
-      case alpha:
-	__ret = isalpha(__c);
-	break;
-      case digit:
-	__ret = isdigit(__c);
-	break;
-      case punct:
-	__ret = ispunct(__c);
-	break;
-      case xdigit:
-	__ret = isxdigit(__c);
-	break;
-      case alnum:
-	__ret = isalnum(__c);
-	break;
-      case graph:
-	__ret = isgraph(__c);
-	break;
-      default:
-	__ret = false;
-	break;
+	bool __ret = true;
+	const int __bitmasksize = 11; 
+	int __bitcur = 0; // Lowest bitmask in ctype_base == 0
+	for (;__ret && __bitcur < __bitmasksize; ++__bitcur)
+	  {
+	    mask __bit = static_cast<mask>(1 << __bitcur);
+	    if (__m & __bit)
+	      {
+		bool __testis;
+		switch (__bit)
+		  {
+		  case space:
+		    __testis = isspace(__c);
+		    break;
+		  case print:
+		    __testis = isprint(__c);
+		    break;
+		  case cntrl:
+		    __testis = iscntrl(__c);
+		    break;
+		  case upper:
+		    __testis = isupper(__c);
+		    break;
+		  case lower:
+		    __testis = islower(__c);
+		    break;
+		  case alpha:
+		    __testis = isalpha(__c);
+		    break;
+		  case digit:
+		    __testis = isdigit(__c);
+		    break;
+		  case punct:
+		    __testis = ispunct(__c);
+		    break;
+		  case xdigit:
+		    __testis = isxdigit(__c);
+		    break;
+		  case alnum:
+		    __testis = isalnum(__c);
+		    break;
+		  case graph:
+		    __testis = isgraph(__c);
+		    break;
+		  default:
+		    __testis = false;
+		    break;
+		  }
+		__ret &= __testis;
+	      }
+	  }
+	return __ret;
       }
-    return __ret;
   }
    
   const char*
   ctype<char>::
   is(const char* __low, const char* __high, mask* __vec) const
   {
-    const int __bitmasksize = 11; // Highest bitmask in ctype_base == 10
-    for (;__low < __high; ++__vec, ++__low)
+    if (_M_table)
+      while (__low < __high)
+	*__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+    else
       {
-	mask __m = 0;
-	int __i = 0; // Lowest bitmask in ctype_base == 0
-	for (;__i < __bitmasksize; ++__i)
+	// Highest bitmask in ctype_base == 10.
+	const int __bitmasksize = 11; 
+	for (;__low < __high; ++__vec, ++__low)
 	  {
-	    mask __bit = static_cast<mask>(1 << __i);
-	    if (this->is(__bit, *__low))
-	      __m |= __bit;
+	    mask __m = 0;
+	    // Lowest bitmask in ctype_base == 0
+	    int __i = 0; 
+	    for (;__i < __bitmasksize; ++__i)
+	      {
+		mask __bit = static_cast<mask>(1 << __i);
+		if (this->is(__bit, *__low))
+		  __m |= __bit;
+	      }
+	    *__vec = __m;
 	  }
-	*__vec = __m;
       }
     return __high;
   }
@@ -110,8 +136,13 @@
   ctype<char>::
   scan_is(mask __m, const char* __low, const char* __high) const
   {
-    while (__low < __high && !this->is(__m, *__low))
-      ++__low;
+    if (_M_table)
+      while (__low < __high
+	     && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
+	++__low;
+    else
+      while (__low < __high && !this->is(__m, *__low))
+	++__low;
     return __low;
   }
 
@@ -119,7 +150,12 @@
   ctype<char>::
   scan_not(mask __m, const char* __low, const char* __high) const
   {
-    while (__low < __high && this->is(__m, *__low) != 0)
-      ++__low;
+    if (_M_table)
+      while (__low < __high
+	     && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
+	++__low;
+    else
+      while (__low < __high && this->is(__m, *__low) != 0)
+	++__low;
     return __low;
   }
diff --git a/libstdc++-v3/configure.target b/libstdc++-v3/configure.target
index a186659daf32..526d300200f0 100644
--- a/libstdc++-v3/configure.target
+++ b/libstdc++-v3/configure.target
@@ -166,7 +166,7 @@ case "${target_os}" in
   solaris2.6*)
     os_include_dir="os/solaris/solaris2.6"
     ;;
-  solaris2.[78]*)
+  solaris2.[789]*)
     os_include_dir="os/solaris/solaris2.7"
     ;;
   windiss*)
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc
index 07b3a2dabd0c..d7e72d67f3ab 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/2.cc
@@ -33,7 +33,7 @@ void test02()
   bool test = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
-  locale 		loc ("en_US.ISO-8859-1");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc
index b44e86f70794..ad45e6214342 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/3.cc
@@ -33,7 +33,7 @@ void test03()
   bool test = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
-  locale 		loc ("en_US.ISO-8859-15");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc
index 15a8546c3d7a..fe72e341a53b 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/always_noconv/wchar_t/4.cc
@@ -33,7 +33,7 @@ void test04()
   bool test = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
-  locale 		loc ("en_US.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc
index 9c7f5d040e6b..c3eca4aeaa59 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/2.cc
@@ -33,7 +33,7 @@ void test02()
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
   bool 			test = true;
 
-  locale 		loc ("en_US.ISO-8859-1");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc
index 98a8961113e0..8297c260d69f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/3.cc
@@ -33,7 +33,7 @@ void test03()
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
   bool 			test = true;
 
-  locale 		loc ("en_US.ISO-8859-15");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc
index f2ada106694e..2ffc351c8737 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/encoding/wchar_t/4.cc
@@ -33,7 +33,7 @@ void test04()
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
   bool 			test = true;
 
-  locale 		loc ("en_US.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc
index d9e55ef3858b..a7a622f16a13 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/2.cc
@@ -88,7 +88,7 @@ void test02()
   wmemset(i_ref, 0xdeadbeef, size + 1);
   int_type*		ito_next;
 
-  locale 		loc ("en_US.ISO-8859-1");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc
index 152e7e9fe4f3..1279d3be1a30 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/3.cc
@@ -102,7 +102,7 @@ void test03()
   wmemset(i_ref, 0xdeadbeef, size + 1);
   int_type*		ito_next;
 
-  locale 		loc ("en_US.ISO-8859-15");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc
index c916a16b6c9a..a4ef7fe01c2c 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/4.cc
@@ -110,7 +110,7 @@ void test04()
   wmemset(i_ref, 0xdeadbeef, esize + 1);
   int_type*		ito_next;
 
-  locale 		loc ("en_US.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc
index f692e9cee6ee..799414bbbe58 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/7.cc
@@ -60,7 +60,7 @@ void test07()
   wmemset(i_ref, 0xdeadbeef, size + 1);
   int_type*		ito_next;
 
-  locale 		loc ("en_US.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc
index 28b1fa04f80e..27a59c6aa53c 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/8.cc
@@ -109,7 +109,7 @@ void test08()
   wmemset(i_ref, 0xdeadbeef, esize + 1);
   int_type*		ito_next;
 
-  locale 		loc ("en_US.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
index 0ddebc771a97..f95a43626ef1 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/in/wchar_t/9.cc
@@ -111,7 +111,7 @@ void test09()
   int_type*		ito = i_arr;
   int_type*		ito_next;
 
-  locale 		loc ("en_US.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc
index 0e90fbdc8333..029e30f8fef2 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/2.cc
@@ -61,7 +61,7 @@ void test02()
     "\xff";
   int 			size = strlen(e_lit);
 
-  locale 		loc ("en_US.ISO-8859-1");
+  locale  loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc
index 8031c3edee0c..41555def81e5 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/3.cc
@@ -61,7 +61,7 @@ void test03()
     "\xff";
   int 			size = strlen(e_lit);
 
-  locale 		loc ("en_US.ISO-8859-15");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc
index 6a802bd2856c..f49e47dad873 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/4.cc
@@ -100,7 +100,7 @@ void test04()
   int 			esize = strlen(e_lit);
   int 			isize = wcslen(i_lit);
 
-  locale 		loc ("en_US.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc
index 8a275e35a37d..485bfe0278c1 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/length/wchar_t/7.cc
@@ -52,7 +52,7 @@ void test07()
   const ext_type*       efrom_next;
   int 			size = strlen(e_lit);
 
-  locale 		loc ("en_US.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc
index 9c76752d6116..efa390b42d84 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/2.cc
@@ -31,7 +31,7 @@ void test02()
   bool test = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
-  locale 		loc ("en_US.ISO-8859-1");
+  locale  loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc
index 2d312bddc311..50877849d2d2 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/3.cc
@@ -31,7 +31,7 @@ void test03()
   bool test = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
-  locale 		loc ("en_US.ISO-8859-15");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc
index cd4d08d5733a..2e2a62e6e326 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/max_length/wchar_t/4.cc
@@ -31,7 +31,7 @@ void test04()
   bool test = true;
   typedef codecvt<wchar_t, char, mbstate_t> 	w_codecvt;
 
-  locale 		loc ("en_US.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc
index c2e807da594a..bb172dbe351c 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/2.cc
@@ -86,7 +86,7 @@ void test02()
   memset(e_ref, 0xf0, size + 1);
   ext_type*		eto_next;
 
-  locale 		loc ("en_US.ISO-8859-1");
+  locale  loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc
index d92e01c7d2bd..8d396f87863f 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/3.cc
@@ -100,7 +100,7 @@ void test03()
   memset(e_ref, 0xf0, size + 1);
   ext_type*		eto_next;
 
-  locale 		loc ("en_US.ISO-8859-15");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc
index 626ff70efe44..1a28aa74cd37 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/4.cc
@@ -107,7 +107,7 @@ void test04()
   memset(e_ref, 0xf0, esize + 1);
   ext_type*		eto_next;
 
-  locale 		loc ("en_US.UTF-8");
+  locale  loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc
index 3ea57c05c038..7b5c120b7f28 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/out/wchar_t/7.cc
@@ -58,7 +58,7 @@ void test03()
   memset(e_ref, 0xf0, size + 1);
   ext_type*		eto_next;
 
-  locale 		loc ("en_US.ISO-8859-1");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc
index 77e3b9292dd4..5bd81df7a36d 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/2.cc
@@ -71,7 +71,7 @@ void test02()
   memset(e_ref, 0xf0, size + 1);
   ext_type*		eto_next;
 
-  locale 		loc ("en_US.ISO-8859-1");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc
index a828090b14df..167e12375a8d 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/3.cc
@@ -85,7 +85,7 @@ void test03()
   memset(e_ref, 0xf0, size + 1);
   ext_type*		eto_next;
 
-  locale 		loc ("en_US.ISO-8859-15");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-15");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc
index 09a91ed55976..631b87399bba 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt/unshift/wchar_t/4.cc
@@ -80,7 +80,7 @@ void test04()
   memset(e_ref, 0xf0, size + 1);
   ext_type*		eto_next;
 
-  locale 		loc ("en_US.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.UTF-8");
   locale::global(loc);
   const w_codecvt* 	cvt = &use_facet<w_codecvt>(loc); 
 
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
index bed2fb40991a..fd4c90dadffe 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/1.cc
@@ -33,9 +33,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
@@ -74,6 +74,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
index ab29ac409e1c..892bac545340 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/2.cc
@@ -33,9 +33,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
@@ -81,6 +81,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc
index c8209548bc3a..e604b202b6f2 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/char/3.cc
@@ -33,7 +33,7 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
 
   // cache the collate facets
@@ -85,6 +85,6 @@ void test03()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc
index 0ba7b05835e7..b74157b84e34 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/1.cc
@@ -33,9 +33,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc
index 24b327f979b7..67ab49de7576 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/2.cc
@@ -33,9 +33,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc
index 0f9ee649c323..824f8e1dfa6b 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/compare/wchar_t/3.cc
@@ -33,7 +33,7 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
 
   // cache the collate facets
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
index 47fcd579ec72..5e8336885b56 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/char/2.cc
@@ -33,9 +33,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
@@ -70,6 +70,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc
index b11be4a99907..79e3267e4350 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/hash/wchar_t/2.cc
@@ -32,9 +32,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
index 24ff7cdac8fb..4a38327d5eb1 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/2.cc
@@ -32,9 +32,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
@@ -67,6 +67,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc
index f9d16b54944e..21b90ff0e158 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/char/3.cc
@@ -32,7 +32,7 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
 
   // cache the collate facets
@@ -88,6 +88,6 @@ void test03()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc
index f643fd68da62..274d78c7c5d0 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/2.cc
@@ -32,9 +32,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc
index 108c0a4be30c..0a3f98113f91 100644
--- a/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate/transform/wchar_t/3.cc
@@ -32,7 +32,7 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
 
   // cache the collate facets
diff --git a/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc b/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc
index edfb42c2120d..eec1513af27a 100644
--- a/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate_byname/1.cc
@@ -32,12 +32,12 @@ void test01()
   string str;
   locale loc_c = locale::classic();
 
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
+  str = loc_de.name();
+
   locale loc_byname(locale::classic(), new collate_byname<char>("de_DE"));
   str = loc_byname.name();
 
-  locale loc_de("de_DE");
-  str = loc_de.name();
-
   VERIFY( loc_de != loc_byname );
 
   // cache the collate facets
@@ -131,6 +131,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
index d04800a01ca0..605e5f3dfdbb 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/char/2.cc
@@ -67,7 +67,7 @@ void test02()
     }   
 
   // "de_DE"
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   const ctype<char>& ctype_de = use_facet<ctype<char> >(loc_de); 
   for (int i = 0; i < max; ++i)
     {
@@ -99,6 +99,6 @@ void test02()
 
 int main() 
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc
index b1b565f37801..7ff278c1f87c 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/is/wchar_t/2.cc
@@ -67,7 +67,7 @@ void test02()
     }   
 
   // "de_DE"
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   const ctype<wchar_t>& ctype_de = use_facet<ctype<wchar_t> >(loc_de); 
   for (int i = 0; i < max; ++i)
     {
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc
index f235d8a36610..67d9b6ee1531 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/narrow/wchar_t/3.cc
@@ -38,7 +38,7 @@ void test03()
   using namespace std;
   bool test = true;
 
-  locale loc ("se_NO.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("se_NO.UTF-8");
   const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc);
 
   const wchar_t* wstrlit = L"\x80";
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc
index e4e49676c5ba..e1ab3f76bbe0 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/2.cc
@@ -38,7 +38,7 @@ void test02()
   using namespace std;
   bool test = true;
 
-  locale loc ("en_US.ISO-8859-1");
+  locale loc = __gnu_cxx_test::try_named_locale("en_US.ISO-8859-1");
   const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc);
 
   char c = 0xff;
diff --git a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc
index e872a944b850..1d380d49fdbd 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype/widen/wchar_t/3.cc
@@ -38,7 +38,7 @@ void test03()
   using namespace std;
   bool test = true;
 
-  locale loc ("se_NO.UTF-8");
+  locale loc = __gnu_cxx_test::try_named_locale("se_NO.UTF-8");
   const ctype<wchar_t>& wct = use_facet<ctype<wchar_t> >(loc);
 
   const char* strlit = "\xc2\x80";
diff --git a/libstdc++-v3/testsuite/22_locale/facet/2.cc b/libstdc++-v3/testsuite/22_locale/facet/2.cc
index ea63d731a3f1..379ed8975f0a 100644
--- a/libstdc++-v3/testsuite/22_locale/facet/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/facet/2.cc
@@ -83,12 +83,12 @@ void test02()
   // 4: Named locale should destroy facets when it goes out of scope.
   // Not quite sure how to test for this w/o valgrind at the moment.
   {
-    locale loc03("es_MX");
+    locale loc03 = __gnu_cxx_test::try_named_locale("es_MX");
   }
 }
 
 int main ()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc
index 1f13c23992ec..1c03e4df29e6 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/2.cc
@@ -80,7 +80,7 @@ namespace std
 
       static char_type* 
       copy(char_type* __s1, const char_type* __s2, size_t __n)
-      {  return static_cast<char_type*>(memcpy(__s1, __s2, __n)); }
+      { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); }
 
       static char_type* 
       assign(char_type* __s, size_t __n, char_type __a);
@@ -170,7 +170,7 @@ void test01()
 
   // 3
   // explicit locale(const char* std_name)
-  locale loc06("fr_FR");
+  locale loc06 = __gnu_cxx_test::try_named_locale("fr_FR");
   VERIFY (loc06 != loc01);  
   VERIFY (loc06 != loc02);  
   VERIFY (loc06.name() == "fr_FR");
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc
index 4864b0bad7d5..f20542a137cc 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/4.cc
@@ -33,7 +33,7 @@ void test03()
   const char* LC_ALL_orig = getenv("LC_ALL");
   if (!setenv("LC_ALL", "it_IT", 1))
     {
-      std::locale loc(""); 
+      std::locale loc = __gnu_cxx_test::try_named_locale(""); 
       VERIFY( loc.name() == "it_IT" );
       setenv("LC_ALL", LC_ALL_orig ? LC_ALL_orig : "", 1);
     }
@@ -42,6 +42,6 @@ void test03()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc
index 5c649d0b5b9d..55ace6eaf82c 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/5.cc
@@ -65,7 +65,7 @@ void test04()
   // Check that a "POSIX" LC_ALL is equivalent to "C".
   if (!setenv("LC_ALL", "POSIX", 1))
     {
-      locale loc("");
+      locale loc = __gnu_cxx_test::try_named_locale("");
       VERIFY( loc.name() == "C" );
     }
   setenv("LC_ALL", "", 1);
@@ -73,7 +73,7 @@ void test04()
   // Check that a "en_PH" LC_ALL is equivalent to "en_PH".
   if (!setenv("LC_ALL", "en_PH", 1))
     {
-      locale loc("");
+      locale loc = __gnu_cxx_test::try_named_locale("");
       VERIFY( loc.name() == "en_PH" );
     }
   setenv("LC_ALL", "", 1);
@@ -83,7 +83,7 @@ void test04()
     {
       if (!setenv("LC_ALL", "en_PH", 1))
 	{
-	  locale loc("");
+	  locale loc = __gnu_cxx_test::try_named_locale("");
 	  VERIFY( loc.name() == "en_PH" );
 	}
       setenv("LC_ALL", "", 1);
@@ -112,7 +112,7 @@ void test04()
   // Check the default set by LANG.
   if (!setenv("LANG", "fr_FR", 1))
     {
-      locale loc("");
+      locale loc = __gnu_cxx_test::try_named_locale("");
       VERIFY( loc.name() == "fr_FR" );
     }
 
@@ -126,7 +126,7 @@ void test04()
   // Setting a category in the "C" default.
   if (!setenv("LC_COLLATE", "de_DE", 1))
     {
-      locale loc("");
+      locale loc = __gnu_cxx_test::try_named_locale("");
 
 #if _GLIBCPP_NUM_CATEGORIES
       VERIFY( loc.name() == "LC_CTYPE=C;LC_NUMERIC=C;LC_TIME=C;"
@@ -142,7 +142,7 @@ void test04()
   // Changing the LANG default while LC_COLLATE is set.
   if (!setenv("LANG", "fr_FR", 1))
     {
-      locale loc("");
+      locale loc = __gnu_cxx_test::try_named_locale("");
 #if _GLIBCPP_NUM_CATEGORIES
       VERIFY( loc.name() == "LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;"
 	      "LC_TIME=fr_FR;LC_COLLATE=de_DE;LC_MONETARY=fr_FR;"
@@ -160,7 +160,7 @@ void test04()
 #if _GLIBCPP_NUM_CATEGORIES
   if (!setenv("LC_IDENTIFICATION", "it_IT", 1))
     {
-      locale loc("");
+      locale loc = __gnu_cxx_test::try_named_locale("");
       VERIFY( loc.name() == "LC_CTYPE=fr_FR;LC_NUMERIC=fr_FR;"
 	      "LC_TIME=fr_FR;LC_COLLATE=de_DE;LC_MONETARY=fr_FR;"
 	      "LC_MESSAGES=fr_FR;LC_PAPER=fr_FR;LC_NAME=fr_FR;"
@@ -193,6 +193,6 @@ void test04()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test04);
+  test04();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc
index fb709666d483..ced0f59f6be9 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7.cc
@@ -35,9 +35,9 @@ test02()
 
   // construct a locale object with the specialized facet.
   locale		loc_c = locale::classic();
+  locale		loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
   locale 		loc_1(locale::classic(), 
 			      new numpunct_byname<char>("fr_FR"));
-  locale		loc_fr("fr_FR");
 
   // check names
   VERIFY( loc_c.name() == name_c );
@@ -99,6 +99,6 @@ test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc
index 7a93dee1541f..003462441ee4 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-c.cc
@@ -31,7 +31,7 @@ void test02()
   bool test = true;
 
   std::locale loc_c1("C");
-  std::locale loc_c2 ("C");
+  std::locale loc_c2("C");
   VERIFY( loc_c1 == loc_c2 );
 }
  
diff --git a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc
index 1309a318386e..126db7da1fa7 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/cons/7222-env.cc
@@ -30,13 +30,13 @@ void test02()
 {
   bool test = true;
 
-  std::locale loc_1("");
-  std::locale loc_2("");
+  std::locale loc_1 = __gnu_cxx_test::try_named_locale("");
+  std::locale loc_2 = __gnu_cxx_test::try_named_locale("");
   VERIFY( loc_1 == loc_2 );
 }
  
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc
index bde35e263470..7d5aec00771f 100644
--- a/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/locale/global_locale_objects/2.cc
@@ -42,13 +42,13 @@ void test02()
   // named locales work.
   if (testph && testmx)
     {
-      const locale loc_ph(ph.c_str());
-      const locale loc_mx(mx.c_str());
+      const locale loc_ph = __gnu_cxx_test::try_named_locale(ph.c_str());
+      const locale loc_mx = __gnu_cxx_test::try_named_locale(mx.c_str());
       
       // Use setlocale between two calls to locale("")
-      const locale loc_env_1("");
+      const locale loc_env_1 = __gnu_cxx_test::try_named_locale("");
       setlocale(LC_ALL, ph.c_str());
-      const locale loc_env_2("");
+      const locale loc_env_2 = __gnu_cxx_test::try_named_locale("");
       VERIFY( loc_env_1 == loc_env_2 );
       
       // Change global locale.
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc
index 7167fadef108..2956ec8ab9e2 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/1.cc
@@ -35,9 +35,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
@@ -64,6 +64,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc
index 61ffba626c15..eed7efaa2628 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/2.cc
@@ -35,9 +35,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
@@ -64,6 +64,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc
index 55cf80193d6d..ad975115720e 100644
--- a/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages/members/char/3.cc
@@ -35,9 +35,9 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
@@ -64,6 +64,6 @@ void test03()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc b/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc
index e9d3217c08f2..e915c9675cb1 100644
--- a/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages_byname/1.cc
@@ -35,12 +35,12 @@ void test01()
   const char* dir = LOCALEDIR;
   locale loc_c = locale::classic();
 
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
+  str = loc_de.name();
+
   locale loc_byname(locale::classic(), new messages_byname<char>("de_DE"));
   str = loc_byname.name();
 
-  locale loc_de("de_DE");
-  str = loc_de.name();
-
   VERIFY( loc_de != loc_byname );
 
   // cache the messages facets
@@ -73,6 +73,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc
index f4e5481def6e..b35b448db2fa 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/1.cc
@@ -36,9 +36,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -146,6 +146,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc
index 42e149609a0c..a0d4caef7a2e 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/2.cc
@@ -36,9 +36,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -135,6 +135,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc
index 749c68c73ab9..80e47c940fd5 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/3.cc
@@ -36,9 +36,9 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -91,6 +91,6 @@ void test03()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc
index b2456658e56f..b62e2f44764f 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/char/4.cc
@@ -36,9 +36,9 @@ void test04()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -86,6 +86,6 @@ void test04()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test04);
+  test04();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc
index d8d86f2cfafe..8d1d532c9a14 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/1.cc
@@ -36,9 +36,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc
index 9b3c8741e321..38721ce9991a 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/2.cc
@@ -36,9 +36,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc
index 747b4944494c..da33d636035f 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/3.cc
@@ -36,9 +36,9 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc
index 030c47a2994e..91b05cb45e4a 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get/get/wchar_t/4.cc
@@ -36,9 +36,9 @@ void test04()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc
index d34d3fba0e77..27d79dc4b07e 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/1.cc
@@ -36,9 +36,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -124,6 +124,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc
index d1c240f78097..69cfeb6ca553 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/2.cc
@@ -36,9 +36,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -115,6 +115,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc
index 73c84b2c4d50..49531ad0a387 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/char/3.cc
@@ -36,9 +36,9 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -104,6 +104,6 @@ void test03()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
index 400ce026ce7e..19c04d680079 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/1.cc
@@ -36,9 +36,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
index d99a240ff0a9..ad5834b19213 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/2.cc
@@ -36,9 +36,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
index 8a7778396bcb..03c747ac8425 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put/put/wchar_t/3.cc
@@ -36,9 +36,9 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE@euro");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE@euro");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc
index 7d74101c95d1..13d680e14fb8 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/char/2.cc
@@ -34,7 +34,7 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
 
   // cache the moneypunct facets
   typedef moneypunct<char, true> __money_true;
@@ -95,6 +95,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc
index 2e258f9ce2c5..4394d83257a8 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct/members/wchar_t/2.cc
@@ -34,7 +34,7 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
 
   // cache the moneypunct facets
   typedef moneypunct<wchar_t, true> __money_true;
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc
index 83fc8f62b318..70cbf38058d4 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct_byname/1.cc
@@ -32,12 +32,12 @@ void test01()
   bool test = true;
   string str;
 
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
+  str = loc_de.name();
+
   locale loc_byname(locale::classic(), new moneypunct_byname<char>("de_DE"));
   str = loc_byname.name();
 
-  locale loc_de("de_DE");
-  str = loc_de.name();
-
   locale loc_c = locale::classic();
 
   VERIFY( loc_de != loc_byname );
@@ -93,7 +93,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
-
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
index 3723e23ffd42..6f972c578244 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/1.cc
@@ -33,9 +33,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -162,7 +162,7 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc
index 108fae13c1b5..cb446c7e36ae 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/2.cc
@@ -33,9 +33,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -132,7 +132,7 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc
index b6c0f12ca1aa..41867ca91920 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/3.cc
@@ -33,9 +33,9 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -94,7 +94,7 @@ void test03()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc
index 94da704f1d39..0590d49b13e2 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/5.cc
@@ -36,7 +36,7 @@ void test05()
   istringstream iss;
 
   // A locale that expects grouping  
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   iss.imbue(loc_de);
 
   const num_get<char>& ng = use_facet<num_get<char> >(iss.getloc()); 
@@ -84,7 +84,7 @@ void test05()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test05);
+  test05();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc
index b5e0a21615b8..a6b94172035c 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/char/6.cc
@@ -33,7 +33,7 @@ void test06()
   double d = 0.0;
 
   istringstream iss;
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   iss.imbue(loc_de);
 
   const num_get<char>& ng = use_facet<num_get<char> >(iss.getloc()); 
@@ -49,7 +49,7 @@ void test06()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test06);
+  test06();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
index a30cf971946f..ef055b3d3e50 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/1.cc
@@ -33,9 +33,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc
index dc11885adf2a..bbf2a98872ac 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/2.cc
@@ -33,9 +33,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc
index d3b1118354ba..65fcf84051a6 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/3.cc
@@ -33,9 +33,9 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc
index 7eaaa89e9f72..8443816a8d6c 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/5.cc
@@ -36,7 +36,7 @@ void test05()
   wistringstream iss;
 
   // A locale that expects grouping  
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   iss.imbue(loc_de);
 
   const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(iss.getloc()); 
diff --git a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc
index 2f4bb1bb0b42..57490f3f0aa4 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get/get/wchar_t/6.cc
@@ -33,7 +33,7 @@ void test06()
   double d = 0.0;
 
   wistringstream iss;
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   iss.imbue(loc_de);
 
   const num_get<wchar_t>& ng = use_facet<num_get<wchar_t> >(iss.getloc()); 
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc
index 87abef44e9a2..b34fce2b672f 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/1.cc
@@ -33,9 +33,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de  = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -169,7 +169,7 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc
index a62dfc1f88b6..407dbff3a659 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/2.cc
@@ -33,9 +33,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -105,7 +105,7 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc
index 0bc92b2af0e1..080a2a476727 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/3.cc
@@ -33,9 +33,9 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -88,7 +88,7 @@ void test03()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc
index eb0bd2196221..055f4c9f316b 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/char/5.cc
@@ -33,7 +33,7 @@ void test05()
   bool test = true;
 
   // A locale that expects grouping.
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
 
   const string empty;
   string result;
@@ -63,7 +63,7 @@ void test05()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test05);
+  test05();
   return 0;
 }
 
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc
index 9c5bdc5968e2..28ed5d7e4f39 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/1.cc
@@ -33,9 +33,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc
index de08c093745a..8416c4c16c92 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/2.cc
@@ -33,9 +33,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc
index ae2d0cfac8cc..26750ac7a619 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/3.cc
@@ -33,9 +33,9 @@ void test03()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc
index 18ea8edc6008..dd4799b85bd4 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put/put/wchar_t/5.cc
@@ -33,7 +33,7 @@ void test05()
   bool test = true;
 
   // A locale that expects grouping.
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
 
   const wstring empty;
   wstring result;
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc
index aba34e29267f..023c64f8d7ce 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/1.cc
@@ -31,9 +31,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
@@ -60,6 +60,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc
index ec9512fedbe5..b6c8b2ddeccb 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/char/2.cc
@@ -31,9 +31,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
@@ -82,6 +82,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc
index ac4e8201dbe1..e3426fda43ce 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/1.cc
@@ -31,9 +31,9 @@ void test01()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc
index c544b29cce68..9b55ae95e33f 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct/members/wchar_t/2.cc
@@ -31,9 +31,9 @@ void test02()
 
   // basic construction
   locale loc_c = locale::classic();
-  locale loc_us("en_US");
-  locale loc_fr("fr_FR");
-  locale loc_de("de_DE");
+  locale loc_us = __gnu_cxx_test::try_named_locale("en_US");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_c != loc_de );
   VERIFY( loc_us != loc_fr );
   VERIFY( loc_us != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc
index a6c71dc644ec..96a9691ac6d6 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/1.cc
@@ -30,12 +30,12 @@ void test01()
   bool test = true;
   string str;
 
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
+  str = loc_de.name();
+
   locale loc_byname(locale::classic(), new numpunct_byname<char>("de_DE"));
   str = loc_byname.name();
 
-  locale loc_de("de_DE");
-  str = loc_de.name();
-
   locale loc_c = locale::classic();
 
   VERIFY( loc_de != loc_byname );
@@ -71,6 +71,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc b/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc
index f096a8b9f0cd..6bebbbf0d4c8 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_byname/2.cc
@@ -29,7 +29,7 @@ void test02()
   
   bool test = true;
 
-  locale loc_it("it_IT");
+  locale loc_it = __gnu_cxx_test::try_named_locale("it_IT");
 
   const numpunct<char>& nump_it = use_facet<numpunct<char> >(loc_it); 
 
@@ -40,6 +40,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc
index 46958a21da39..59128a613366 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/char/1.cc
@@ -33,9 +33,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -64,6 +64,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc
index 9baf0216bc26..b4a2fcf69849 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/date_order/wchar_t/1.cc
@@ -33,9 +33,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc
index f242c4bee4a3..a4782795f6e6 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/1.cc
@@ -34,9 +34,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -107,6 +107,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc
index 274a231cd6e4..149b95276d58 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/char/2.cc
@@ -34,9 +34,9 @@ void test02()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -103,6 +103,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc
index 965493d316fe..71a30d11b87e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/1.cc
@@ -34,9 +34,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc
index 1e4d57afb44b..33312396daca 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_date/wchar_t/2.cc
@@ -34,9 +34,9 @@ void test02()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc
index 2fd9b7600052..6ecbb0a0ddbb 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/1.cc
@@ -37,9 +37,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -121,6 +121,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc
index c98f8d1cb503..6535a66c4e93 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/char/2.cc
@@ -34,9 +34,9 @@ void test02()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -85,6 +85,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc
index 8ba9d5df074c..7e82e5197c20 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/1.cc
@@ -37,9 +37,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc
index 80fe2dfda41d..edab4ba3f3ca 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_monthname/wchar_t/2.cc
@@ -34,9 +34,9 @@ void test02()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
index 80d996c0c47c..89015346acf9 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/1.cc
@@ -33,9 +33,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -122,6 +122,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc
index 1d56827071cf..ddb817f0913b 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/char/2.cc
@@ -33,9 +33,9 @@ void test02()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -75,6 +75,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
index 5d64670f3bd4..a1fe3b3d2e7c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/1.cc
@@ -33,9 +33,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc
index 5b7293848cc9..0151fc64d336 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_time/wchar_t/2.cc
@@ -33,9 +33,9 @@ void test02()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc
index ca89d1e4a2b7..c530170d05a6 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/1.cc
@@ -34,9 +34,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -129,6 +129,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc
index 6e9d99936ef3..68a7d89ed1a3 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/char/2.cc
@@ -34,9 +34,9 @@ void test02()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -85,6 +85,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc
index a865c2eff1d3..0c7d5b40f042 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/1.cc
@@ -34,9 +34,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc
index 299f2ef05253..af2e3ecc6ec6 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_weekday/wchar_t/2.cc
@@ -34,9 +34,9 @@ void test02()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
index aabfd6d0f252..0f408fc1f120 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/char/1.cc
@@ -34,9 +34,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -118,6 +118,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
index c117311c7319..e5c726a13b34 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get/get_year/wchar_t/1.cc
@@ -34,9 +34,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc
index f54a8c918290..d3acb9b824a0 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/1.cc
@@ -40,9 +40,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -85,6 +85,6 @@ void test01()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test01);
+  test01();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc
index 665036b1c6ee..4656efc16e4d 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/2.cc
@@ -40,9 +40,9 @@ void test02()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -80,6 +80,6 @@ void test02()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc
index 3399669df85d..3b768db4b121 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/3.cc
@@ -40,9 +40,9 @@ void test03()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -80,6 +80,6 @@ void test03()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
index afb45eecacc6..d07fad6dc2d2 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/4.cc
@@ -40,9 +40,9 @@ void test04()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -79,6 +79,6 @@ void test04()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test04);
+  test04();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
index b7b0055c29d2..e1355b8ea471 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/5.cc
@@ -41,9 +41,9 @@ void test05()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -75,6 +75,6 @@ void test05()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test05);
+  test05();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
index 9287571901c4..5634d9f3bde5 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/6.cc
@@ -41,9 +41,9 @@ void test06()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -73,6 +73,6 @@ void test06()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test06);
+  test06();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
index 00cefcfe7b9c..91a5e9bf8487 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/7.cc
@@ -42,9 +42,9 @@ void test07()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -74,6 +74,6 @@ void test07()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test07);
+  test07();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
index 10afde5c5005..7409ff9cbb4d 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/char/8.cc
@@ -41,9 +41,9 @@ void test08()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
@@ -72,6 +72,6 @@ void test08()
 
 int main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test08);
+  test08();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc
index 914b187d46b9..874b62800c22 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/1.cc
@@ -40,9 +40,9 @@ void test01()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc
index bddb23f52d86..b41e6a7feb5c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/2.cc
@@ -40,9 +40,9 @@ void test02()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc
index 566a3a57ca4a..d3cf9dd9971c 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/3.cc
@@ -40,9 +40,9 @@ void test03()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
index 88d3b04239fa..db04bcc07654 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/4.cc
@@ -40,9 +40,9 @@ void test04()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
index ac53243b3392..9268127b1a5e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/5.cc
@@ -41,9 +41,9 @@ void test05()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc
index 0f5855510a98..90f7614f9d94 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/6.cc
@@ -41,9 +41,9 @@ void test06()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc
index 44a86ac80c89..c63147870dfa 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/7.cc
@@ -41,9 +41,9 @@ void test07()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc
index 900dc1328e62..a7edf18c477e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put/put/wchar_t/8.cc
@@ -41,9 +41,9 @@ void test08()
 
   // basic construction and sanity checks.
   locale loc_c = locale::classic();
-  locale loc_hk("en_HK");
-  locale loc_fr("fr_FR@euro");
-  locale loc_de("de_DE");
+  locale loc_hk = __gnu_cxx_test::try_named_locale("en_HK");
+  locale loc_fr = __gnu_cxx_test::try_named_locale("fr_FR@euro");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   VERIFY( loc_hk != loc_c );
   VERIFY( loc_hk != loc_fr );
   VERIFY( loc_hk != loc_de );
diff --git a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc
index e584f461bb70..5a43a2a4a2f1 100644
--- a/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_filebuf/imbue/char/9322.cc
@@ -34,10 +34,10 @@ void test07()
   std::filebuf ob;
   VERIFY( ob.getloc() == loc );
 
-  locale::global(locale("en_US"));
+  locale::global(__gnu_cxx_test::try_named_locale("en_US"));
   VERIFY( ob.getloc() == loc );
 
-  locale loc_de ("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   locale ret = ob.pubimbue(loc_de);
   VERIFY( ob.getloc() == loc_de );
   VERIFY( ret == loc );
@@ -48,6 +48,6 @@ void test07()
 
 main() 
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test07);
+  test07();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc
index 03d45154e35b..6daa4e02c5e4 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ios/copyfmt/char/2.cc
@@ -43,7 +43,7 @@ void test03()
   typedef std::ios_base::fmtflags fmtflags;
   typedef std::ios_base::iostate iostate;
   locale loc_c = locale::classic();
-  locale loc_de("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   std::ios ios_01(NULL);
   std::ios ios_02(NULL);
   ios_01.imbue(loc_c);
@@ -68,6 +68,6 @@ void test03()
 
 int main() 
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc
index ed4979fa3a85..92180927f6fd 100644
--- a/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_ostream/inserters_arithmetic/char/2.cc
@@ -43,7 +43,7 @@ test02()
   os2.setf(ios::fixed);
 
   // Check it can be done in a locale with grouping on.
-  locale loc2("de_DE");
+  locale loc2 = __gnu_cxx_test::try_named_locale("de_DE");
   os2.imbue(loc2);
   os2 << fixed << setprecision(3) << val2 << endl;
   os2 << endl;
@@ -53,6 +53,6 @@ test02()
 int 
 main()
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test02);
+  test02();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc
index 3b8da10b5ada..fee82668f9d0 100644
--- a/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_streambuf/imbue/char/9322.cc
@@ -53,10 +53,10 @@ void test08()
   testbuf ob;
   VERIFY( ob.getloc() == loc );
 
-  locale::global(locale("en_US"));
+  locale::global(__gnu_cxx_test::try_named_locale("en_US"));
   VERIFY( ob.getloc() == loc );
 
-  locale loc_de ("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   locale ret = ob.pubimbue(loc_de);
   VERIFY( ob.getloc() == loc_de );
   VERIFY( ret == loc );
@@ -67,6 +67,6 @@ void test08()
 
 int main() 
 {
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test08);
+  test08();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc
index 3da38fb8ff43..7006dda094ad 100644
--- a/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc
+++ b/libstdc++-v3/testsuite/27_io/basic_stringbuf/imbue/char/9322.cc
@@ -33,10 +33,10 @@ void test03()
   std::stringbuf ob;
   VERIFY( ob.getloc() == loc );
 
-  locale::global(locale("en_US"));
+  locale::global(__gnu_cxx_test::try_named_locale("en_US"));
   VERIFY( ob.getloc() == loc );
 
-  locale loc_de ("de_DE");
+  locale loc_de = __gnu_cxx_test::try_named_locale("de_DE");
   locale ret = ob.pubimbue(loc_de);
   VERIFY( ob.getloc() == loc_de );
   VERIFY( ret == loc );
@@ -48,6 +48,6 @@ void test03()
 int main() 
 {
   using namespace std;
-  __gnu_cxx_test::run_test_wrapped_generic_locale_exception_catcher(test03);
+  test03();
   return 0;
 }
diff --git a/libstdc++-v3/testsuite/testsuite_hooks.cc b/libstdc++-v3/testsuite/testsuite_hooks.cc
index d51a3d34435f..988ef03620ee 100644
--- a/libstdc++-v3/testsuite/testsuite_hooks.cc
+++ b/libstdc++-v3/testsuite/testsuite_hooks.cc
@@ -148,20 +148,8 @@ namespace __gnu_cxx_test
     bool test = true;
     
     // Set the global locale. 
-    try
-      {
-	locale loc_name(name);
-	locale orig = locale::global(loc_name);
-      }
-    catch (std::runtime_error& ex)
-      {
-	if (std::strstr (ex.what(), "unhandled name in generic implementation"))
-	  return;
-	else if (std::strstr (ex.what(), "unknown name"))
-	  return;
-	else
-	  throw;
-      }
+    locale loc_name = try_named_locale(name);
+    locale orig = locale::global(loc_name);
 
     const char* res = setlocale(LC_ALL, name);
     if (res != NULL)
@@ -185,20 +173,9 @@ namespace __gnu_cxx_test
     
 #ifdef _GLIBCPP_HAVE_SETENV 
     // Set the global locale. 
-    try
-      {
-	locale loc_name(name);
-	locale orig = locale::global(loc_name);
-      }
-    catch (std::runtime_error& ex)
-      {
-	if (std::strstr (ex.what(), "unhandled name in generic implementation"))
-	  return;
-	else if (std::strstr (ex.what(), "unknown name"))
-	  return;
-	else
-	  throw;
-      }
+    locale loc_name = try_named_locale(name);
+    locale orig = locale::global(loc_name);
+
     // Set environment variable env to value in name. 
     const char* oldENV = getenv(env);
     if (!setenv(env, name, 1))
@@ -212,19 +189,21 @@ namespace __gnu_cxx_test
 #endif
   }
 
-  void 
-  run_test_wrapped_generic_locale_exception_catcher(const test_func f)
+  std::locale 
+  try_named_locale(const char* name)
   {
     try
       {
-	f();
+	return std::locale(name);
       }
     catch (std::runtime_error& ex)
       {
-	if (std::strstr (ex.what(), "unhandled name in generic implementation"))
-	  return;
-	else if (std::strstr (ex.what(), "unknown name"))
-	  return;
+	// Thrown by generic implemenation.
+	if (std::strstr(ex.what(), "unhandled name in generic implementation"))
+	  exit(0);
+	// Thrown by gnu implemenation.
+	else if (std::strstr(ex.what(), "unknown name"))
+	  exit(0);
 	else
 	  throw;
       }
diff --git a/libstdc++-v3/testsuite/testsuite_hooks.h b/libstdc++-v3/testsuite/testsuite_hooks.h
index da397e3bdfd1..0c3aae6cec9f 100644
--- a/libstdc++-v3/testsuite/testsuite_hooks.h
+++ b/libstdc++-v3/testsuite/testsuite_hooks.h
@@ -68,6 +68,7 @@
 # define VERIFY(fn) test &= (fn)
 #endif
 #include <list>
+#include <locale>
 
 namespace __gnu_cxx_test
 {
@@ -105,9 +106,9 @@ namespace __gnu_cxx_test
   void 
   run_tests_wrapped_env(const char*, const char*, const func_callback&);
 
-  // Run select unit test inside exception catcher for non-C named locale
-  void 
-  run_test_wrapped_generic_locale_exception_catcher(const test_func);
+  // Try to create a locale with the given name. If it fails, bail.
+  std::locale
+  try_named_locale(const char* name);
 
   // Test data types.
   struct pod_char
-- 
GitLab