* [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
@ 2015-02-02 15:49 Matthew Wahab
2015-02-02 16:17 ` Paolo Carlini
0 siblings, 1 reply; 18+ messages in thread
From: Matthew Wahab @ 2015-02-02 15:49 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 1282 bytes --]
Hello,
With target arm-none-eabi, the libstdc++ tests
28_regex/traits/char/isctype.cc and 28_regex/traits/wchar/isctype.cc fail at
--
VERIFY(!t.isctype('\n', t.lookup_classname(range(blank))));
--
This is because libstdc++ puts '\n' in the 'space' character class,
rather than 'blank' when building on newlib. This problem was known when
suport for the blank character class was added to libstdc++ (see
https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01902.html) so this
failure is not unexpected.
Changes to newlib that would have allowed the problem to be fixed were
made (https://sourceware.org/ml/newlib/2009/msg00342.html) but then
reverted (https://sourceware.org/ml/newlib/2009/msg00438.html).
This patch modifies the test to add a special case for the behaviour
with newlib.
Tested by running check-target-libstdc++-v3 -
libstdc++-dg/conformance.exp, with the modified tests, for arm-none-eabi
and aarch64-none-linux-gnu. No new failures and the modified tests now
pass on arm-none-eabi.
Ok for trunk?
Matthew
libstdc++-v3/testsuite/
2015-02-02 Matthew Wahab <matthew.wahab@arm.com>
* 28_regex/traits/char/isctype.cc (test01): Add newlib special
case for '\n'.
* 28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: isctype_newlib.patch --]
[-- Type: text/x-patch; name=isctype_newlib.patch, Size: 1767 bytes --]
diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
index a7b1396..df0dac8 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
@@ -53,7 +53,12 @@ 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 (__NEWLIB__)
+ /* newlib includes '\n' in class 'blank'. */
+ VERIFY( t.isctype('\n', t.lookup_classname(range(blank))));
+#else
VERIFY(!t.isctype('\n', t.lookup_classname(range(blank))));
+#endif
VERIFY( t.isctype('t', t.lookup_classname(range(upper), true)));
VERIFY( t.isctype('T', t.lookup_classname(range(lower), true)));
#undef range
diff --git a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
index e450f6d..b6088bd 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
@@ -50,7 +50,12 @@ test01()
VERIFY(!t.isctype(L'_', t.lookup_classname(range(digit))));
VERIFY( t.isctype(L' ', t.lookup_classname(range(blank))));
VERIFY( t.isctype(L'\t', t.lookup_classname(range(blank))));
+#if defined (__NEWLIB__)
+ /* newlib includes '\n' in class 'blank'. */
+ VERIFY( t.isctype(L'\n', t.lookup_classname(range(blank))));
+#else
VERIFY(!t.isctype(L'\n', t.lookup_classname(range(blank))));
+#endif
VERIFY( t.isctype(L't', t.lookup_classname(range(upper), true)));
VERIFY( t.isctype(L'T', t.lookup_classname(range(lower), true)));
#undef range
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-02 15:49 [PATCH][libstdc++][Testsuite] isctype test fails for newlib Matthew Wahab
@ 2015-02-02 16:17 ` Paolo Carlini
2015-02-02 16:33 ` Jonathan Wakely
0 siblings, 1 reply; 18+ messages in thread
From: Paolo Carlini @ 2015-02-02 16:17 UTC (permalink / raw)
To: Matthew Wahab, gcc-patches; +Cc: libstdc++
Hi,
On 02/02/2015 04:49 PM, Matthew Wahab wrote:
> Hello,
>
> With target arm-none-eabi, the libstdc++ tests
> 28_regex/traits/char/isctype.cc and 28_regex/traits/wchar/isctype.cc
> fail at
> --
> VERIFY(!t.isctype('\n', t.lookup_classname(range(blank))));
> --
> This is because libstdc++ puts '\n' in the 'space' character class,
> rather than 'blank' when building on newlib. This problem was known
> when suport for the blank character class was added to libstdc++ (see
> https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01902.html) so this
> failure is not unexpected.
>
> Changes to newlib that would have allowed the problem to be fixed were
> made (https://sourceware.org/ml/newlib/2009/msg00342.html) but then
> reverted (https://sourceware.org/ml/newlib/2009/msg00438.html).
>
> This patch modifies the test to add a special case for the behaviour
> with newlib.
>
> Tested by running check-target-libstdc++-v3 -
> libstdc++-dg/conformance.exp, with the modified tests, for
> arm-none-eabi and aarch64-none-linux-gnu. No new failures and the
> modified tests now pass on arm-none-eabi.
>
> Ok for trunk?
I guess the patch is Ok for trunk, but please also add in the comment a
link to this message of yours, that is
https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html.
Thanks,
Paolo.
PS: please remember to always CC libstdc++-v3 patches to
libstdc++@gcc.gnu.org.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-02 16:17 ` Paolo Carlini
@ 2015-02-02 16:33 ` Jonathan Wakely
[not found] ` <54CFBBD5.4080205@arm.com>
2015-02-03 10:17 ` Matthew Wahab
0 siblings, 2 replies; 18+ messages in thread
From: Jonathan Wakely @ 2015-02-02 16:33 UTC (permalink / raw)
To: Paolo Carlini; +Cc: Matthew Wahab, gcc-patches, libstdc++
On 2 February 2015 at 16:17, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Hi,
>
> On 02/02/2015 04:49 PM, Matthew Wahab wrote:
>>
>> Hello,
>>
>> With target arm-none-eabi, the libstdc++ tests
>> 28_regex/traits/char/isctype.cc and 28_regex/traits/wchar/isctype.cc fail at
>> --
>> VERIFY(!t.isctype('\n', t.lookup_classname(range(blank))));
>> --
>> This is because libstdc++ puts '\n' in the 'space' character class, rather
>> than 'blank' when building on newlib. This problem was known when suport for
>> the blank character class was added to libstdc++ (see
>> https://gcc.gnu.org/ml/gcc-patches/2014-10/msg01902.html) so this failure
>> is not unexpected.
>>
>> Changes to newlib that would have allowed the problem to be fixed were
>> made (https://sourceware.org/ml/newlib/2009/msg00342.html) but then reverted
>> (https://sourceware.org/ml/newlib/2009/msg00438.html).
>>
>> This patch modifies the test to add a special case for the behaviour with
>> newlib.
>>
>> Tested by running check-target-libstdc++-v3 -
>> libstdc++-dg/conformance.exp, with the modified tests, for arm-none-eabi and
>> aarch64-none-linux-gnu. No new failures and the modified tests now pass on
>> arm-none-eabi.
>>
>> Ok for trunk?
This is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64467 so please
note that in the ChangeLog.
> I guess the patch is Ok for trunk, but please also add in the comment a link
> to this message of yours, that is
> https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html.
>
> Thanks,
> Paolo.
>
> PS: please remember to always CC libstdc++-v3 patches to
> libstdc++@gcc.gnu.org.
Yes, not everyone subscribes to gcc-patches so please always send
libstdc++ patches to the libstdc++ list, as documented at
https://gcc.gnu.org/lists.html and in the libstdc++ manual.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
[not found] ` <54CFBBD5.4080205@arm.com>
@ 2015-02-02 18:14 ` Jonathan Wakely
0 siblings, 0 replies; 18+ messages in thread
From: Jonathan Wakely @ 2015-02-02 18:14 UTC (permalink / raw)
To: Matthew Wahab; +Cc: Paolo Carlini, gcc-patches, libstdc++
On 2 February 2015 at 18:03, Matthew Wahab wrote:
> Updated patch attached and changelog below.
Looks good, OK for trunk - thanks for fixing it.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-02 16:33 ` Jonathan Wakely
[not found] ` <54CFBBD5.4080205@arm.com>
@ 2015-02-03 10:17 ` Matthew Wahab
2015-02-03 10:27 ` Paolo Carlini
1 sibling, 1 reply; 18+ messages in thread
From: Matthew Wahab @ 2015-02-03 10:17 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++
[-- Attachment #1: Type: text/plain, Size: 1008 bytes --]
[Email problems so resending to the list, sorry for multiple copies.]
On 02/02/15 16:33, Jonathan Wakely wrote:
> On 2 February 2015 at 16:17, Paolo Carlini <paolo.carlini@oracle.com> wrote:
>
> This is https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64467 so please
> note that in the ChangeLog.
>
>> I guess the patch is Ok for trunk, but please also add in the comment a link
>> to this message of yours, that is
>> https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html.
Updated patch attached and changelog below.
> Yes, not everyone subscribes to gcc-patches so please always send
> libstdc++ patches to the libstdc++ list, as documented at
> https://gcc.gnu.org/lists.html and in the libstdc++ manual.
Noted, sorry about that.
Matthew
libstdc++-v3/testsuite/
2015-02-02 Matthew Wahab <matthew.wahab@arm.com>
PR libstdc++/64467
* 28_regex/traits/char/isctype.cc (test01): Add newlib special
case for '\n'.
* 28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: isctype_newlib.patch --]
[-- Type: text/x-patch; name=isctype_newlib.patch, Size: 1919 bytes --]
diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
index a7b1396..7c47045 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
@@ -53,7 +53,13 @@ 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 (__NEWLIB__)
+ /* newlib includes '\n' 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
VERIFY(!t.isctype('\n', t.lookup_classname(range(blank))));
+#endif
VERIFY( t.isctype('t', t.lookup_classname(range(upper), true)));
VERIFY( t.isctype('T', t.lookup_classname(range(lower), true)));
#undef range
diff --git a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
index e450f6d..1b3d69a 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
@@ -50,7 +50,13 @@ test01()
VERIFY(!t.isctype(L'_', t.lookup_classname(range(digit))));
VERIFY( t.isctype(L' ', t.lookup_classname(range(blank))));
VERIFY( t.isctype(L'\t', t.lookup_classname(range(blank))));
+#if defined (__NEWLIB__)
+ /* newlib includes '\n' in class 'blank'.
+ See https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html. */
+ VERIFY( t.isctype(L'\n', t.lookup_classname(range(blank))));
+#else
VERIFY(!t.isctype(L'\n', t.lookup_classname(range(blank))));
+#endif
VERIFY( t.isctype(L't', t.lookup_classname(range(upper), true)));
VERIFY( t.isctype(L'T', t.lookup_classname(range(lower), true)));
#undef range
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-03 10:17 ` Matthew Wahab
@ 2015-02-03 10:27 ` Paolo Carlini
2015-02-03 10:40 ` Matthew Wahab
0 siblings, 1 reply; 18+ messages in thread
From: Paolo Carlini @ 2015-02-03 10:27 UTC (permalink / raw)
To: Matthew Wahab, gcc-patches; +Cc: libstdc++
Hi,
On 02/03/2015 11:17 AM, Matthew Wahab wrote:
> libstdc++-v3/testsuite/
> 2015-02-02 Matthew Wahab <matthew.wahab@arm.com>
>
> PR libstdc++/64467
> * 28_regex/traits/char/isctype.cc (test01): Add newlib special
> case for '\n'.
> * 28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
Nit: the path should be * testsuite/28_regex/... and likewise for the
other testcase, because it starts where is the corresponding ChangeLog.
Paolo
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-03 10:27 ` Paolo Carlini
@ 2015-02-03 10:40 ` Matthew Wahab
2015-02-03 11:17 ` Paolo Carlini
2015-02-07 0:12 ` Jonathan Wakely
0 siblings, 2 replies; 18+ messages in thread
From: Matthew Wahab @ 2015-02-03 10:40 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++
[-- Attachment #1: Type: text/plain, Size: 490 bytes --]
On 03/02/15 10:27, Paolo Carlini wrote:
> Nit: the path should be * testsuite/28_regex/... and likewise for the
> other testcase, because it starts where is the corresponding ChangeLog.
Fixed changelog:
libstdc++-v3/
2015-02-02 Matthew Wahab <matthew.wahab@arm.com>
PR libstdc++/64467
* testsuite/28_regex/traits/char/isctype.cc (test01): Add newlib
special case for '\n'.
* testsuite/28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
Ok to commit?
Matthew
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: isctype_newlib.patch --]
[-- Type: text/x-patch; name=isctype_newlib.patch, Size: 1907 bytes --]
diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
index a7b1396..7c47045 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
@@ -53,7 +53,13 @@ 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 (__NEWLIB__)
+ /* newlib includes '\n' 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
VERIFY(!t.isctype('\n', t.lookup_classname(range(blank))));
+#endif
VERIFY( t.isctype('t', t.lookup_classname(range(upper), true)));
VERIFY( t.isctype('T', t.lookup_classname(range(lower), true)));
#undef range
diff --git a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
index e450f6d..1b3d69a 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
@@ -50,7 +50,13 @@ test01()
VERIFY(!t.isctype(L'_', t.lookup_classname(range(digit))));
VERIFY( t.isctype(L' ', t.lookup_classname(range(blank))));
VERIFY( t.isctype(L'\t', t.lookup_classname(range(blank))));
+#if defined (__NEWLIB__)
+ /* newlib includes '\n' in class 'blank'.
+ See https://gcc.gnu.org/ml/gcc-patches/2015-02/msg00059.html. */
+ VERIFY( t.isctype(L'\n', t.lookup_classname(range(blank))));
+#else
VERIFY(!t.isctype(L'\n', t.lookup_classname(range(blank))));
+#endif
VERIFY( t.isctype(L't', t.lookup_classname(range(upper), true)));
VERIFY( t.isctype(L'T', t.lookup_classname(range(lower), true)));
#undef range
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-03 10:40 ` Matthew Wahab
@ 2015-02-03 11:17 ` Paolo Carlini
2015-02-07 0:12 ` Jonathan Wakely
1 sibling, 0 replies; 18+ messages in thread
From: Paolo Carlini @ 2015-02-03 11:17 UTC (permalink / raw)
To: Matthew Wahab, gcc-patches; +Cc: libstdc++
Hi,
On 02/03/2015 11:40 AM, Matthew Wahab wrote:
> Ok to commit?
Ok thanks.
Paolo.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-03 10:40 ` Matthew Wahab
2015-02-03 11:17 ` Paolo Carlini
@ 2015-02-07 0:12 ` Jonathan Wakely
2015-02-09 11:25 ` Matthew Wahab
1 sibling, 1 reply; 18+ messages in thread
From: Jonathan Wakely @ 2015-02-07 0:12 UTC (permalink / raw)
To: Matthew Wahab; +Cc: gcc-patches, libstdc++
Any idea why HP still sees the tests fail? See comment 8 at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64467#c8
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-07 0:12 ` Jonathan Wakely
@ 2015-02-09 11:25 ` Matthew Wahab
2015-02-09 13:18 ` Hans-Peter Nilsson
0 siblings, 1 reply; 18+ messages in thread
From: Matthew Wahab @ 2015-02-09 11:25 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: gcc-patches, libstdc++, hp
On 07/02/15 00:11, Jonathan Wakely wrote:
> Any idea why HP still sees the tests fail? See comment 8 at
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64467#c8
It looks like he's found the problem: that _NEWLIB_ is a recent addition
that isn't in the version he's using. I'll try replacing _NEWLIB_ with
_NEWLIB_VERSION_ as suggested.
Matthew
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-09 11:25 ` Matthew Wahab
@ 2015-02-09 13:18 ` Hans-Peter Nilsson
2015-02-09 17:50 ` Matthew Wahab
[not found] ` <54D8F2F6.7030406@arm.com>
0 siblings, 2 replies; 18+ messages in thread
From: Hans-Peter Nilsson @ 2015-02-09 13:18 UTC (permalink / raw)
To: Matthew Wahab; +Cc: Jonathan Wakely, gcc-patches, libstdc++, hp
On Mon, 9 Feb 2015, Matthew Wahab wrote:
> On 07/02/15 00:11, Jonathan Wakely wrote:
> > Any idea why HP still sees the tests fail? See comment 8 at
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64467#c8
>
> It looks like he's found the problem: that _NEWLIB_ is a recent addition that
> isn't in the version he's using. I'll try replacing _NEWLIB_ with
> _NEWLIB_VERSION_ as suggested.
(Careful with that macro spelling, if nothing else.)
Better to use existing mechanisms and stop playing with
target-related macros. Add this at the top (see other
placements of dg-options) and replace "#if defined (__NEWLIB__)"
with "#ifdef NEWLINE_IN_CLASS_BLANK":
// { dg-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
brgds, H-P
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-09 13:18 ` Hans-Peter Nilsson
@ 2015-02-09 17:50 ` Matthew Wahab
[not found] ` <54D8F2F6.7030406@arm.com>
1 sibling, 0 replies; 18+ messages in thread
From: Matthew Wahab @ 2015-02-09 17:50 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++, Jonathan Wakely
[-- Attachment #1: Type: text/plain, Size: 1414 bytes --]
On 09/02/15 13:18, Hans-Peter Nilsson wrote:
> On Mon, 9 Feb 2015, Matthew Wahab wrote:
>> On 07/02/15 00:11, Jonathan Wakely wrote:
>>> Any idea why HP still sees the tests fail? See comment 8 at
>>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64467#c8
>>
>> It looks like he's found the problem: that _NEWLIB_ is a recent addition that
>> isn't in the version he's using. I'll try replacing _NEWLIB_ with
>> _NEWLIB_VERSION_ as suggested.
>
> (Careful with that macro spelling, if nothing else.)
>
> Better to use existing mechanisms and stop playing with
> target-related macros. Add this at the top (see other
> placements of dg-options) and replace "#if defined (__NEWLIB__)"
> with "#ifdef NEWLINE_IN_CLASS_BLANK":
>
> // { dg-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
>
Attached a patch to replace the test for macro __NEWLIB__ with a test
for macro NEWLINE_IN_CLASS_BLANK, defined by
{ dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
Tested with check-target-libstdc++-v3, with the modified tests, for
arm-none-eabi and aarch64-none-linux-gnu.
Does this look ok to commit?
Matthew
libstdc++-v3/testsuite/
2015-02-09 Matthew Wahab <matthew.wahab@arm.com>
* 28_regex/traits/char/isctype.cc (test01): Replace test
for __NEWLIB__ macro with a dejagnu set macro.
* 28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: isctype_target.patch --]
[-- Type: text/x-patch; name=isctype_target.patch, Size: 1957 bytes --]
diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
index 7c47045..b6fd6ff 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
@@ -1,5 +1,6 @@
// { 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>
@@ -53,8 +54,8 @@ 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 (__NEWLIB__)
- /* newlib includes '\n' in class '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
diff --git a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
index 1b3d69a..9ba609c 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
@@ -1,5 +1,6 @@
// { dg-do run }
// { dg-options "-std=gnu++11" }
+// { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
// Copyright (C) 2010-2015 Free Software Foundation, Inc.
//
@@ -51,7 +52,7 @@ test01()
VERIFY( t.isctype(L' ', t.lookup_classname(range(blank))));
VERIFY( t.isctype(L'\t', t.lookup_classname(range(blank))));
#if defined (__NEWLIB__)
- /* newlib includes '\n' 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(L'\n', t.lookup_classname(range(blank))));
#else
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
[not found] ` <alpine.BSF.2.02.1502091814490.19399@arjuna.pair.com>
@ 2015-02-10 8:51 ` Matthew Wahab
2015-02-11 11:14 ` Matthew Wahab
0 siblings, 1 reply; 18+ messages in thread
From: Matthew Wahab @ 2015-02-10 8:51 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++
On 09/02/15 23:17, Hans-Peter Nilsson wrote:
> On Mon, 9 Feb 2015, Matthew Wahab wrote:
>> Attached a patch to replace the test for macro __NEWLIB__ with a test for
>> macro NEWLINE_IN_CLASS_BLANK, defined by
>> { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
>>
>> Tested with check-target-libstdc++-v3, with the modified tests, for
>> arm-none-eabi and aarch64-none-linux-gnu.
>>
>> Does this look ok to commit?
>
> Not valid for approval, but that's what I meant!
> Modulo the typo forgetting to
> s/__NEWLIB__/NEWLINE_IN_CLASS_BLANK/ in the ifdef in
> wchar_t/isctype.cc of course.
I'll redo the patch.
Matthew
>> libstdc++-v3/testsuite/
>> 2015-02-09 Matthew Wahab <matthew.wahab@arm.com>
>>
>> * 28_regex/traits/char/isctype.cc (test01): Replace test
>> for __NEWLIB__ macro with a dejagnu set macro.
>> * 28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-10 8:51 ` Matthew Wahab
@ 2015-02-11 11:14 ` Matthew Wahab
2015-02-11 15:44 ` Jonathan Wakely
0 siblings, 1 reply; 18+ messages in thread
From: Matthew Wahab @ 2015-02-11 11:14 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++, Hans-Peter Nilsson, Jonathan Wakely
[-- Attachment #1: Type: text/plain, Size: 1116 bytes --]
On 10/02/15 08:51, Matthew Wahab wrote:
> On 09/02/15 23:17, Hans-Peter Nilsson wrote:
>> On Mon, 9 Feb 2015, Matthew Wahab wrote:
>>> Attached a patch to replace the test for macro __NEWLIB__ with a test for
>>> macro NEWLINE_IN_CLASS_BLANK, defined by
>>> { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
>>>
>>> Tested with check-target-libstdc++-v3, with the modified tests, for
>>> arm-none-eabi and aarch64-none-linux-gnu.
>>>
>>> Does this look ok to commit?
>>
>> Not valid for approval, but that's what I meant!
>> Modulo the typo forgetting to
>> s/__NEWLIB__/NEWLINE_IN_CLASS_BLANK/ in the ifdef in
>> wchar_t/isctype.cc of course.
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?
Matthew
libstdc++-v3/
2015-02-11 Matthew Wahab <matthew.wahab@arm.com>
* testsuite/28_regex/traits/char/isctype.cc (test01): Replace test
for __NEWLIB__ macro with a dejagnu set macro.
* testsuite/28_regex/traits/wchar_t/isctype.cc (test01): Likewise.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: isctype_target.patch --]
[-- Type: text/x-patch; name=isctype_target.patch, Size: 2058 bytes --]
diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
index 7c47045..b6fd6ff 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
@@ -1,5 +1,6 @@
// { 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>
@@ -53,8 +54,8 @@ 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 (__NEWLIB__)
- /* newlib includes '\n' in class '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
diff --git a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
index 1b3d69a..144d679 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/wchar_t/isctype.cc
@@ -1,5 +1,6 @@
// { dg-do run }
// { dg-options "-std=gnu++11" }
+// { dg-additional-options "-DNEWLINE_IN_CLASS_BLANK" { target newlib } }
// Copyright (C) 2010-2015 Free Software Foundation, Inc.
//
@@ -50,8 +51,8 @@ test01()
VERIFY(!t.isctype(L'_', t.lookup_classname(range(digit))));
VERIFY( t.isctype(L' ', t.lookup_classname(range(blank))));
VERIFY( t.isctype(L'\t', t.lookup_classname(range(blank))));
-#if defined (__NEWLIB__)
- /* newlib includes '\n' in class '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(L'\n', t.lookup_classname(range(blank))));
#else
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-11 11:14 ` Matthew Wahab
@ 2015-02-11 15:44 ` Jonathan Wakely
2015-02-13 13:48 ` Matthew Wahab
0 siblings, 1 reply; 18+ messages in thread
From: Jonathan Wakely @ 2015-02-11 15:44 UTC (permalink / raw)
To: Matthew Wahab; +Cc: gcc-patches, libstdc++, Hans-Peter Nilsson, Jonathan Wakely
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.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-11 15:44 ` Jonathan Wakely
@ 2015-02-13 13:48 ` Matthew Wahab
2015-03-09 12:47 ` Jonathan Wakely
0 siblings, 1 reply; 18+ messages in thread
From: Matthew Wahab @ 2015-02-13 13:48 UTC (permalink / raw)
To: gcc-patches; +Cc: libstdc++, Jonathan Wakely, Hans-Peter Nilsson
[-- Attachment #1: Type: text/plain, Size: 979 bytes --]
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.
Tested with check-target-libstdc++-v3/conformance.exp for arm-none-eabi
and aarch64-none-linux-gnu; checked the patched file in emacs.
Matthew
2015-02-13 Matthew Wahab <matthew.wahab@arm.com>
* testsuite/28_regex/traits/char/isctype.cc (test01): Fix
mixed line-endings introduced in last change.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: changes.patch --]
[-- Type: text/x-patch; name=changes.patch, Size: 1473 bytes --]
diff --git a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
index 0a1071c..8f71910 100644
--- a/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
+++ b/libstdc++-v3/testsuite/28_regex/traits/char/isctype.cc
@@ -51,14 +51,14 @@ test01()
VERIFY(!t.isctype('e', t.lookup_classname(range(upper))));
VERIFY( t.isctype('e', t.lookup_classname(range(lower))));
VERIFY(!t.isctype('e', t.lookup_classname(range(nothing))));
- 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
+ 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
VERIFY(!t.isctype('\n', t.lookup_classname(range(blank))));
#endif
VERIFY( t.isctype('t', t.lookup_classname(range(upper), true)));
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-02-13 13:48 ` Matthew Wahab
@ 2015-03-09 12:47 ` Jonathan Wakely
2015-03-10 9:56 ` Matthew Wahab
0 siblings, 1 reply; 18+ messages in thread
From: Jonathan Wakely @ 2015-03-09 12:47 UTC (permalink / raw)
To: Matthew Wahab; +Cc: gcc-patches, libstdc++, Hans-Peter Nilsson
[-- Attachment #1: Type: text/plain, Size: 1041 bytes --]
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!
[-- Attachment #2: patch.txt --]
[-- Type: text/x-patch, Size: 1662 bytes --]
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)));
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH][libstdc++][Testsuite] isctype test fails for newlib.
2015-03-09 12:47 ` Jonathan Wakely
@ 2015-03-10 9:56 ` Matthew Wahab
0 siblings, 0 replies; 18+ messages in thread
From: Matthew Wahab @ 2015-03-10 9:56 UTC (permalink / raw)
To: Jonathan Wakely; +Cc: gcc-patches, libstdc++, Hans-Peter Nilsson
On 09/03/15 12:47, Jonathan Wakely wrote:
> On 13/02/15 13:48 +0000, Matthew Wahab wrote:
>> 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.
Sorry, I thought I'd got them all.
Matthew
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2015-03-10 9:56 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02 15:49 [PATCH][libstdc++][Testsuite] isctype test fails for newlib Matthew Wahab
2015-02-02 16:17 ` Paolo Carlini
2015-02-02 16:33 ` Jonathan Wakely
[not found] ` <54CFBBD5.4080205@arm.com>
2015-02-02 18:14 ` Jonathan Wakely
2015-02-03 10:17 ` Matthew Wahab
2015-02-03 10:27 ` Paolo Carlini
2015-02-03 10:40 ` Matthew Wahab
2015-02-03 11:17 ` Paolo Carlini
2015-02-07 0:12 ` Jonathan Wakely
2015-02-09 11:25 ` Matthew Wahab
2015-02-09 13:18 ` Hans-Peter Nilsson
2015-02-09 17:50 ` Matthew Wahab
[not found] ` <54D8F2F6.7030406@arm.com>
[not found] ` <alpine.BSF.2.02.1502091814490.19399@arjuna.pair.com>
2015-02-10 8:51 ` Matthew Wahab
2015-02-11 11:14 ` Matthew Wahab
2015-02-11 15:44 ` Jonathan Wakely
2015-02-13 13:48 ` Matthew Wahab
2015-03-09 12:47 ` Jonathan Wakely
2015-03-10 9:56 ` Matthew Wahab
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).