mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-19 16:19:48 +08:00
Test for proper handling of 8-bit characters in strings.
Reported by Per Hedbor <per@idonex.se>. From-SVN: r32221
This commit is contained in:
parent
6e38f244c4
commit
6b27a7c45b
15
gcc/testsuite/gcc.c-torture/execute/20000227-1.c
Normal file
15
gcc/testsuite/gcc.c-torture/execute/20000227-1.c
Normal file
@ -0,0 +1,15 @@
|
||||
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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user