diff mbox

[libstdc++,committed] fix PR65909

Message ID 553EF66E.9090405@codesourcery.com
State New
Headers show

Commit Message

Sandra Loosemore April 28, 2015, 2:54 a.m. UTC
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
diff mbox

Patch

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));"