-
-
Notifications
You must be signed in to change notification settings - Fork 594
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 22170 - interface thunk doesn't set EBX to GOT (#12950)
* fix Issue 22170 - interface thunk doesn't set EBX to GOT * dshell: Add dll tests for issue 10462
- Loading branch information
Showing
4 changed files
with
70 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,47 @@ | ||
import mydll; | ||
|
||
void main() | ||
void test1() | ||
{ | ||
int n1 = mydll.multiply10(2); | ||
version (Windows) assert(mydll.saved_var == 2); | ||
assert(n1 == 20); | ||
} | ||
|
||
void test2() | ||
{ | ||
version (Windows) auto pvar = &mydll.saved_var; | ||
auto funcptr = &mydll.multiply10; | ||
|
||
int n2 = funcptr(4); | ||
version (Windows) assert(mydll.saved_var == 4); | ||
version (Windows) assert(*pvar == 4); | ||
assert(n2 == 40); | ||
} | ||
|
||
void test3() | ||
{ | ||
S s; | ||
assert(s.add(2) == 2); | ||
assert(s.add(2) == 4); | ||
} | ||
|
||
I i = I.create(); | ||
C c = i.foo(i); | ||
void test9729() | ||
{ | ||
I9729 i = I9729.create(); | ||
C9729 c = i.foo(i); | ||
assert(c is i); | ||
} | ||
|
||
void test10462() | ||
{ | ||
test10462_dll(); | ||
} | ||
|
||
void main() | ||
{ | ||
test1(); | ||
test2(); | ||
test3(); | ||
test9729(); | ||
test10462(); | ||
} |