diff options
author | Jeff Law <law@redhat.com> | 2018-12-04 16:23:03 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2018-12-04 16:23:03 -0700 |
commit | 31475afacaffc82f0317c928d4138f09ebcf3178 (patch) | |
tree | deab2a2efa83e034cf7f56e2a3d42441cb47068e /gcc | |
parent | 037586dddab4e2ce5821a52fd0344286e4fee86c (diff) | |
download | gcc-31475afacaffc82f0317c928d4138f09ebcf3178.zip gcc-31475afacaffc82f0317c928d4138f09ebcf3178.tar.gz gcc-31475afacaffc82f0317c928d4138f09ebcf3178.tar.bz2 |
* gcc.dg/strlenopt-58.c: Handle targets with 2 byte wchar_t.
From-SVN: r266804
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/strlenopt-58.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 18ef9ed..7aad09d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-12-04 Jeff Law <law@redhat.com> + + * gcc.dg/strlenopt-58.c: Handle targets with 2 byte wchar_t. + 2018-12-04 Martin Sebor <msebor@redhat.com> * gcc.target/i386/attr-aligned-2.c: New test. diff --git a/gcc/testsuite/gcc.dg/strlenopt-58.c b/gcc/testsuite/gcc.dg/strlenopt-58.c index e0e8068..034961c 100644 --- a/gcc/testsuite/gcc.dg/strlenopt-58.c +++ b/gcc/testsuite/gcc.dg/strlenopt-58.c @@ -34,8 +34,8 @@ extern void* memchr (const void*, int, size_t); static const wchar_t wc = L'1'; static const wchar_t ws1[] = L"1"; -static const wchar_t wsx[] = L"\x12345678"; -static const wchar_t ws4[] = L"\x00123456\x12005678\x12340078\x12345600"; +static const wchar_t wsx[] = L"\x12345678"; /* { dg-warning "hex escape" "" { target { ! 4byte_wchar_t } } } */ +static const wchar_t ws4[] = L"\x00123456\x12005678\x12340078\x12345600"; /* { dg-warning "hex escape" "" { target { ! 4byte_wchar_t } } } */ void test_wide (void) { @@ -47,7 +47,7 @@ void test_wide (void) ELIM (memchr (L"" + 1, 0, 0) == 0); ELIM (memchr (&wc + 1, 0, 0) == 0); - ELIM (memchr (L"\x12345678", 0, sizeof (wchar_t)) == 0); + ELIM (memchr (L"\x12345678", 0, sizeof (wchar_t)) == 0); /* { dg-warning "hex escape" "" { target { ! 4byte_wchar_t } } } */ const size_t nb = sizeof ws4; const size_t nwb = sizeof (wchar_t); |