blob: e60f25b52a439feb51da21fc95d0d4f0768a8375 [file] [log] [blame]
// PR 41698: off-by-one error in UTF-16 encoding.
// { dg-do run { target c++11 } }
extern "C" void abort (void);
extern "C" void exit (int);
int
main ()
{
char16_t s[] = u"\uffff";
if (sizeof s != 2 * sizeof (char16_t) || s[0] != 0xffff || s[1] != 0)
abort ();
exit (0);
}