From: Jeff Law Date: Tue, 4 Dec 2018 23:23:03 +0000 (-0700) Subject: * gcc.dg/strlenopt-58.c: Handle targets with 2 byte wchar_t. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=31475afacaffc82f0317c928d4138f09ebcf3178;p=gcc.git * gcc.dg/strlenopt-58.c: Handle targets with 2 byte wchar_t. From-SVN: r266804 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 18ef9edb7ad..7aad09dae78 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-12-04 Jeff Law + + * gcc.dg/strlenopt-58.c: Handle targets with 2 byte wchar_t. + 2018-12-04 Martin Sebor * 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 e0e80680936..034961cd810 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);