8sa1-gcc/gcc/testsuite/gcc.c-torture/execute/20000227-1.c
Zack Weinberg 6b27a7c45b Test for proper handling of 8-bit characters in strings.
Reported by Per Hedbor <per@idonex.se>.

From-SVN: r32221
2000-02-27 17:17:01 +00:00

16 lines
269 B
C

static const unsigned char f[] = "\0\377";
static const unsigned char g[] = "\0ÿ";
int main(void)
{
if (sizeof f != 3 || sizeof g != 3)
abort ();
if (f[0] != g[0])
abort ();
if (f[1] != g[1])
abort ();
if (f[2] != g[2])
abort ();
return 0;
}