Test for proper handling of 8-bit characters in strings.
authorZack Weinberg <zack@gcc.gnu.org>
Sun, 27 Feb 2000 17:17:01 +0000 (17:17 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Sun, 27 Feb 2000 17:17:01 +0000 (17:17 +0000)
Reported by Per Hedbor <per@idonex.se>.

From-SVN: r32221

gcc/testsuite/gcc.c-torture/execute/20000227-1.c [new file with mode: 0644]

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 (file)
index 0000000..395a02c
--- /dev/null
@@ -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;
+}