aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/charset/asm2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/charset/asm2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/charset/asm2.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/charset/asm2.c b/gcc-4.9/gcc/testsuite/gcc.dg/charset/asm2.c
new file mode 100644
index 000000000..a9a9c011b
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/charset/asm2.c
@@ -0,0 +1,16 @@
+/* Test for execution character set encoding errors.
+ If we ever get a good way to test error recovery
+ the string "foobar" should be translated. */
+/* { dg-do compile } */
+/* { dg-require-iconv "IBM1047" } */
+asm (not_a_string); /* { dg-error "(parse error|syntax error|expected string literal) before" "not_a_string" } */
+char x[] = "foobar";
+
+void foo (void)
+{
+ char *y;
+ asm (not_a_string2); /* { dg-error "(parse error|syntax error|expected string literal) before" "not_a_string" } */
+
+#define FOO "walrus"
+ y = FOO;
+}