This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] cleanup testsuite for newlib targets



Fixes for new testsuite entries on cross targets. Non-C99 targets don't have a lot of the necessary functionality for full C++ conformance, so the required API bits are not met. In this case, these test are now marked as unsupported.


This isn't necessarily optimal, but I'd appreciate it if people let me roll with this until the header work is done and I have a fuller understanding of how to do this long-term.

tested x86/linux
tested x86/linux x arm-eabi

-benjamin
2007-03-21  Benjamin Kosnik  <bkoz@redhat.com>

        * testsuite/21_strings/headers/cstdlib/functions_std.cc: Without
        C99 support, _GLIBCXX_USE_WCHAR_T not defined, so
        dg-require-c-std.
        * testsuite/tr1/6_containers/headers/functional/synopsis.cc: Same.
        * testsuite/27_io/headers/iostream/synopsis.cc: Same.
        * testsuite/27_io/headers/streambuf/types_std.cc: Same.
        * testsuite/27_io/headers/sstream/types_std.cc: Same.
        * testsuite/27_io/headers/ostream/types_std.cc: Same.
        * testsuite/27_io/headers/istream/types_std.cc: Same.
        * testsuite/27_io/headers/iostream/types_std.cc: Same.
        * testsuite/27_io/headers/fstream/types_std.cc: Same.
        * testsuite/21_strings/headers/string/types_std.cc: Same.
        * testsuite/21_strings/headers/cwctype/functions_std.cc: Same.
        * testsuite/21_strings/headers/cwctype/types_std.cc: Same.
        * testsuite/21_strings/headers/cwchar/functions_std.cc: Same.
        * testsuite/21_strings/headers/cwchar/types_std.cc: Same.
        
        * include/Makefile.am (c_compatibility_headers): Add fenv.h.
        * include/Makefile.in: Regenerate.
        * configure.host: Update comment.

        * include/tr1/cfenv: Use include_next.


Index: configure.host
===================================================================
--- configure.host	(revision 123126)
+++ configure.host	(working copy)
@@ -22,7 +22,7 @@
 #
 #   os_include_dir         OS-specific directory, defaults to os/generic.
 #
-#   c_model                the "C" header model, defaults to c_std.
+#   c_model                the "C" header model, defaults to c_global.
 #
 #   c_compatibility        if "C" compatibility headers are necessary,
 #                          defaults to no.
Index: include/tr1/cfenv
===================================================================
--- include/tr1/cfenv	(revision 123126)
+++ include/tr1/cfenv	(working copy)
@@ -38,7 +38,7 @@
 
 #if _GLIBCXX_USE_C99_FENV_TR1
 
-#include <fenv.h>
+#include_next <fenv.h>
 
 #undef feclearexcept
 #undef fegetexceptflag
Index: include/Makefile.am
===================================================================
--- include/Makefile.am	(revision 123126)
+++ include/Makefile.am	(working copy)
@@ -635,6 +635,7 @@
 if GLIBCXX_C_HEADERS_C_GLOBAL
 c_compatibility_headers = \
 	${c_compatibility_srcdir}/complex.h \
+	${c_compatibility_srcdir}/fenv.h \
 	${c_compatibility_srcdir}/tgmath.h 
 endif
 
Index: testsuite/27_io/headers/fstream/types_std.cc
===================================================================
--- testsuite/27_io/headers/fstream/types_std.cc	(revision 123126)
+++ testsuite/27_io/headers/fstream/types_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/27_io/headers/iostream/types_std.cc
===================================================================
--- testsuite/27_io/headers/iostream/types_std.cc	(revision 123126)
+++ testsuite/27_io/headers/iostream/types_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/27_io/headers/iostream/synopsis.cc
===================================================================
--- testsuite/27_io/headers/iostream/synopsis.cc	(revision 123126)
+++ testsuite/27_io/headers/iostream/synopsis.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/27_io/headers/istream/types_std.cc
===================================================================
--- testsuite/27_io/headers/istream/types_std.cc	(revision 123126)
+++ testsuite/27_io/headers/istream/types_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/27_io/headers/streambuf/types_std.cc
===================================================================
--- testsuite/27_io/headers/streambuf/types_std.cc	(revision 123126)
+++ testsuite/27_io/headers/streambuf/types_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/27_io/headers/ostream/types_std.cc
===================================================================
--- testsuite/27_io/headers/ostream/types_std.cc	(revision 123126)
+++ testsuite/27_io/headers/ostream/types_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/27_io/headers/sstream/types_std.cc
===================================================================
--- testsuite/27_io/headers/sstream/types_std.cc	(revision 123126)
+++ testsuite/27_io/headers/sstream/types_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/21_strings/headers/cstdlib/functions_std.cc
===================================================================
--- testsuite/21_strings/headers/cstdlib/functions_std.cc	(revision 123126)
+++ testsuite/21_strings/headers/cstdlib/functions_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/21_strings/headers/string/types_std.cc
===================================================================
--- testsuite/21_strings/headers/string/types_std.cc	(revision 123126)
+++ testsuite/21_strings/headers/string/types_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/21_strings/headers/cwchar/types_std.cc
===================================================================
--- testsuite/21_strings/headers/cwchar/types_std.cc	(revision 123126)
+++ testsuite/21_strings/headers/cwchar/types_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/21_strings/headers/cwchar/functions_std.cc
===================================================================
--- testsuite/21_strings/headers/cwchar/functions_std.cc	(revision 123126)
+++ testsuite/21_strings/headers/cwchar/functions_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/21_strings/headers/cwctype/types_std.cc
===================================================================
--- testsuite/21_strings/headers/cwctype/types_std.cc	(revision 123126)
+++ testsuite/21_strings/headers/cwctype/types_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/21_strings/headers/cwctype/functions_std.cc
===================================================================
--- testsuite/21_strings/headers/cwctype/functions_std.cc	(revision 123126)
+++ testsuite/21_strings/headers/cwctype/functions_std.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // Copyright (C) 2007 Free Software Foundation, Inc.
 //
Index: testsuite/lib/libstdc++.exp
===================================================================
--- testsuite/lib/libstdc++.exp	(revision 123126)
+++ testsuite/lib/libstdc++.exp	(working copy)
@@ -579,6 +579,7 @@
     return $et_fileio_saved
 }
 
+# Eventually we want C90/C99 determining and switching from this.
 proc check_v3_target_c_std { } {
     global et_c_std_saved
     global et_c_std_target_name
@@ -606,15 +607,19 @@
 
 	# Set up, compile, and execute a C++ test program that tries to use
 	# C99 functionality.
+        # For math bits, could use check_effective_target_c99_math.
 	set src fileio[pid].cc
 	set exe fileio[pid].x
 
 	set f [open $src "w"]
 	puts $f "#include <tr1/cmath>"
+	puts $f "#include <cstdlib>"
 	puts $f "int main ()"
 	puts $f "{"
 	puts $f "  float f = 45.55;"
 	puts $f "  int i = std::tr1::isnan(f);"
+	puts $f "  "
+	puts $f "  using std::wctomb;"
 	puts $f "  return 0;"
 	puts $f "}" 
 	close $f
Index: testsuite/tr1/6_containers/headers/functional/synopsis.cc
===================================================================
--- testsuite/tr1/6_containers/headers/functional/synopsis.cc	(revision 123126)
+++ testsuite/tr1/6_containers/headers/functional/synopsis.cc	(working copy)
@@ -1,4 +1,5 @@
 // { dg-do compile }
+// { dg-require-c-std "" }
 
 // 2007-02-04  Benjamin Kosnik  <bkoz@redhat.com>
 //

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]