This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[libstdc++, committed] fix PR65909
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: libstdc++ <libstdc++ at gcc dot gnu dot org>, Jonathan Wakely <jwakely at redhat dot com>
- Date: Mon, 27 Apr 2015 20:54:38 -0600
- Subject: [libstdc++, committed] fix PR65909
- Authentication-results: sourceware.org; auth=none
This patch works around a libstdc++ testsuite issue: the generated
program that tests for the availability of named locales dereferences
invalid pointers on targets that don't allow command-line arguments to
be passed. (In particular, I ran into this with a simulator for an
embedded target that produces a ton of verbose error messages when it
hits an invalid memory reference.) Jonathan already approved the fix in
the issue, so I've gone ahead and checked it in.
-Sandra
2015-04-27 Sandra Loosemore <sandra@codesourcery.com>
PR libstdc++/65909
libstdc++-v3/
* testsuite/lib/libstdc++.exp (check_v3_target_namedlocale):
Make the generated test program fail gracefully if the target
doesn't support passing command-line arguments.
Index: libstdc++-v3/testsuite/lib/libstdc++.exp
===================================================================
--- libstdc++-v3/testsuite/lib/libstdc++.exp (revision 222496)
+++ libstdc++-v3/testsuite/lib/libstdc++.exp (working copy)
@@ -901,6 +901,11 @@ proc check_v3_target_namedlocale { args
puts $f "using namespace std;"
puts $f "int main (int argc, char** argv)"
puts $f "{"
+ puts $f " if (argc < 2)"
+ puts $f " {"
+ puts $f " printf(\"locale support test not supported\\n\");"
+ puts $f " return 1;"
+ puts $f " }"
puts $f " try"
puts $f " {"
puts $f " locale(*(argv + 1));"