summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/test3004.d
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gdc.test/compilable/test3004.d')
-rw-r--r--gcc/testsuite/gdc.test/compilable/test3004.d19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/compilable/test3004.d b/gcc/testsuite/gdc.test/compilable/test3004.d
new file mode 100644
index 00000000000..baa0cd76a35
--- /dev/null
+++ b/gcc/testsuite/gdc.test/compilable/test3004.d
@@ -0,0 +1,19 @@
+// https://issues.dlang.org/show_bug.cgi?id=3004
+/*
+REQUIRED_ARGS: -ignore -v
+TRANSFORM_OUTPUT: remove_lines("^(predefs|binary|version|config|DFLAG|parse|import|semantic|entry|function object|\s*$)")
+TEST_OUTPUT:
+---
+pragma GNU_attribute (__error)
+pragma GNU_attribute (__error)
+code test3004
+function test3004.test
+---
+*/
+
+extern(C) int printf(char*, ...);
+
+pragma(GNU_attribute, flatten)
+void test() { printf("Hello GNU world!\n".dup.ptr); }
+
+pragma(GNU_attribute, flatten);