]>
Commit | Line | Data |
---|---|---|
921e5a0e JL |
1 | // Skip if not target: arm-*pe |
2 | // Build don't link: | |
3 | // Microsoft's MSVC 2.0 allows dllimport followed by dllexport for variables, | |
4 | // but does not allow dllexport followed by dllimport. | |
5 | // | |
6 | // Switching between dll{export,import} works for functions. | |
7 | // We test for that too (by ensuring no error is produced). | |
8 | ||
9 | __declspec (dllimport) int foo1 (); | |
10 | __declspec (dllexport) int foo1 (); | |
11 | ||
12 | __declspec (dllexport) int foo2 (); | |
13 | __declspec (dllimport) int foo2 (); | |
14 | ||
15 | __declspec (dllimport) int bar1; | |
16 | __declspec (dllexport) int bar1; | |
17 | ||
18 | __declspec (dllexport) int bar2; // ERROR - previously declared | |
19 | __declspec (dllimport) int bar2; // ERROR - redefinition |