This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
- From: Jonathan Wakely <jwakely at redhat dot com>
- To: Matthew Wahab <matthew dot wahab at arm dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, libstdc++ <libstdc++ at gcc dot gnu dot org>, Hans-Peter Nilsson <hp at bitrange dot com>
- Date: Mon, 9 Mar 2015 12:47:47 +0000
- Subject: Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
- Authentication-results: sourceware.org; auth=none
- References: <54D0A5B1 dot 2000806 at arm dot com> <CAH6eHdT2O7rqKPG+auYPPeRmEZsorteub3vgazHpnti3DVdapQ at mail dot gmail dot com> <54D8992B dot 6060707 at arm dot com> <alpine dot BSF dot 2 dot 02 dot 1502090812040 dot 67721 at arjuna dot pair dot com> <54D8F2F6 dot 7030406 at arm dot com> <alpine dot BSF dot 2 dot 02 dot 1502091814490 dot 19399 at arjuna dot pair dot com> <54D9C694 dot 7050102 at arm dot com> <54DB3993 dot 7020000 at arm dot com> <20150211154356 dot GT3360 at redhat dot com> <54DE00B5 dot 6010003 at arm dot com>
On 13/02/15 13:48 +0000, Matthew Wahab wrote:
On 11/02/15 15:43, Jonathan Wakely wrote:
On 11/02/15 11:14 +0000, Matthew Wahab wrote:
Attached the fixed patch.
Tested by running check-target-libstdc++-v3, with the modified tests,
for arm-none-eabi and aarch64-none-linux-gnu.
Ok to commit?
OK, thanks.
Some DOS line endings were introduced into the char/isctype.cc file
when I committed this change These aren't visible in a terminal or
with svn diff but do show up in emacs. This is causing the test to
fail in local runs. The wchar_t/isctype.cc file isn't affected.
I've committed the attached patch as obvious, it just removes the DOS
line endings from the file.
That patch still left DOS line-endings in the file.
The test also now fails for newlib targets not using
--enable-clocale=newlib so I'm just going to disable the check for
'\n' entirely, since it doesn't have consistent behaviour on newlib.
Tested x86_64-linux, committed to trunk. Hopefully we can finally
close this one for good!
commit 923ba4238cc715051fa97441c0cca23245289f23
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Mar 9 10:26:03 2015 +0000
PR libstdc++/64467
* testsuite/28_regex/traits/char/isctype.cc: Don't test newline
for newlib targets. Really fix mixed line-endings this time.
diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
index 8f71910..62d3740 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
@@ -1,9 +1,9 @@
-// { dg-do run }
-// { dg-options "-std=gnu++11" }
-// { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
-
-//
-// 2010-06-23 Stephen M. Webb <stephen.webb@bregmasoft.ca>
+// { dg-do run }
+// { dg-options "-std=gnu++11" }
+// { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
+
+//
+// 2010-06-23 Stephen M. Webb <stephen.webb@bregmasoft.ca>
//
// Copyright (C) 2010-2015 Free Software Foundation, Inc.
//
@@ -54,11 +54,7 @@ test01()
VERIFY(!t.isctype('_', t.lookup_classname(range(digit))));
VERIFY( t.isctype(' ', t.lookup_classname(range(blank))));
VERIFY( t.isctype('\t', t.lookup_classname(range(blank))));
-#if defined (NEWLINE_IN_CLASS_BLANK)
- /* On some targets, '\n' is in class 'blank'.
- See https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html. */
- VERIFY( t.isctype('\n', t.lookup_classname(range(blank))));
-#else
+#if !defined (NEWLINE_IN_CLASS_BLANK)
VERIFY(!t.isctype('\n', t.lookup_classname(range(blank))));
#endif
VERIFY( t.isctype('t', t.lookup_classname(range(upper), true)));