diff options
Diffstat (limited to 'gcc/testsuite/gdc.test/fail_compilation/test17868b.d')
-rw-r--r-- | gcc/testsuite/gdc.test/fail_compilation/test17868b.d | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gdc.test/fail_compilation/test17868b.d b/gcc/testsuite/gdc.test/fail_compilation/test17868b.d new file mode 100644 index 00000000000..5bfff5cf50a --- /dev/null +++ b/gcc/testsuite/gdc.test/fail_compilation/test17868b.d @@ -0,0 +1,16 @@ +/* +TEST_OUTPUT: +---- +fail_compilation/test17868b.d(10): Error: function `test17868b.foo` must be `extern(C)` for `pragma(crt_constructor)` +fail_compilation/test17868b.d(14): Error: function `test17868b.bar` must be `extern(C)` for `pragma(crt_constructor)` +fail_compilation/test17868b.d(9): Error: pragma `crt_constructor` can only apply to a single declaration +---- + */ +pragma(crt_constructor): +void foo() +{ +} + +void bar() +{ +} |