MATCH: Improve `A CMP 0 ? A : -A` set of patterns to use bitwise_equal_p.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / cpp_abi_tag.d
blob542bc4323114fc7fa1c2a71b31c9c4fcb99785ce
1 /* DISABLED: win32 win64
2 REQUIRED_ARGS: -extern-std=c++11
3 TEST_OUTPUT:
4 ---
5 fail_compilation/cpp_abi_tag.d(111): Error: `@gnuAbiTag` can only apply to C++ symbols
6 fail_compilation/cpp_abi_tag.d(131): Error: `@gnuAbiTag` cannot be applied to namespaces
7 fail_compilation/cpp_abi_tag.d(102): Error: `@gnuAbiTag` at least one argument expected
8 fail_compilation/cpp_abi_tag.d(105): Error: `@gnuAbiTag` at least one argument expected
9 fail_compilation/cpp_abi_tag.d(108): Error: `@gnuAbiTag` char `0x99` not allowed in mangling
10 fail_compilation/cpp_abi_tag.d(114): Error: argument `2` to `@gnuAbiTag` cannot be `null`
11 fail_compilation/cpp_abi_tag.d(114): Error: argument `3` to `@gnuAbiTag` cannot be empty
12 fail_compilation/cpp_abi_tag.d(117): Error: `@gnuAbiTag` at least one argument expected
13 fail_compilation/cpp_abi_tag.d(137): Error: only one `@gnuAbiTag` allowed per symbol
14 fail_compilation/cpp_abi_tag.d(137): instead of `@gnuAbiTag(["x"]) @gnuAbiTag(["a"])`, use `@gnuAbiTag("x", "a")`
15 ---
18 #line 100
19 import core.attribute;
21 @gnuAbiTag
22 extern(C++) struct A {}
24 @gnuAbiTag()
25 extern(C++) struct B {}
27 @gnuAbiTag("a\x99")
28 extern(C++) struct D {}
30 @gnuAbiTag("a")
31 struct F {}
33 @gnuAbiTag("a", null, "")
34 extern(C++) struct G {}
36 @gnuAbiTag((string[]).init)
37 extern(C++) struct H {}
39 // Note: There is no way to distinguish between
40 // `extern(C++, "ns") { ... }` and `extern(C++, "ns") ...;`
41 // So ABI tags have to be on the inside
42 extern(C++, "ns") @gnuAbiTag("x") void func1();
43 extern(C++, ns2) @gnuAbiTag("x") void func2();
45 @gnuAbiTag("x")
46 extern(C++, "ns3")
48 void func3();
50 @gnuAbiTag("x")
51 extern(C++, ns4)
53 void func4();
56 @gnuAbiTag("x") @gnuAbiTag("a")
57 extern(C++) void func5();