diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2000-02-27 17:17:01 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2000-02-27 17:17:01 +0000 |
commit | 6b27a7c45b46d1bba8b84db63d184fdf18bc2660 (patch) | |
tree | 060c080a2ef8b8ff9d13d86929800e61bc2cd236 /gcc | |
parent | 6e38f244c445e8a48a783598b151dbea71f897b3 (diff) | |
download | gcc-6b27a7c45b46d1bba8b84db63d184fdf18bc2660.zip gcc-6b27a7c45b46d1bba8b84db63d184fdf18bc2660.tar.gz gcc-6b27a7c45b46d1bba8b84db63d184fdf18bc2660.tar.bz2 |
Test for proper handling of 8-bit characters in strings.
Reported by Per Hedbor <per@idonex.se>.
From-SVN: r32221
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/gcc.c-torture/execute/20000227-1.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.c-torture/execute/20000227-1.c b/gcc/testsuite/gcc.c-torture/execute/20000227-1.c new file mode 100644 index 0000000..395a02c --- /dev/null +++ b/gcc/testsuite/gcc.c-torture/execute/20000227-1.c @@ -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; +} |