d: Merge upstream dmd, druntime 4c18eed967, phobos d945686a4.
[official-gcc.git] / gcc / testsuite / gdc.test / fail_compilation / test23536.d
blobfa1740bebad86c4edb4cc16484f75254bb999250
1 /* TEST_OUTPUT:
2 ---
3 fail_compilation/test23536.d(104): Error: function `test23536.S.nonctor` cannot be a non-static member function for `pragma(crt_constructor)`
4 fail_compilation/test23536.d(106): Error: function `test23536.S.nondtor` cannot be a non-static member function for `pragma(crt_destructor)`
5 ---
6 */
8 // https://issues.dlang.org/show_bug.cgi?id=23536
10 #line 100
12 struct S
14 int x;
15 extern (C) pragma(crt_constructor) void nonctor() { } // should not compile
16 extern (C) pragma(crt_constructor) static void stactor() { } // should compile
17 extern (C) pragma(crt_destructor) void nondtor() { } // should not compile
18 extern (C) pragma(crt_destructor) static void stadtor() { } // should compile