-
-
Notifications
You must be signed in to change notification settings - Fork 606
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 9377 - Link-failure regression cause by fixing issue 8504
The test is disabled only in win64 platform.
- Loading branch information
Showing
6 changed files
with
90 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import std.c.stdio; | ||
|
||
import mul9377b; | ||
|
||
void abc() | ||
{ | ||
printf("mul9377b.abc()\n"); | ||
foo(); | ||
bar(); | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,40 @@ | ||
module mul9377b; | ||
|
||
import std.c.stdio; | ||
|
||
int j; | ||
|
||
int foo()() | ||
{ | ||
printf("foo()\n"); | ||
static int z = 7; | ||
assert(z != 10); | ||
return ++z; | ||
} | ||
|
||
void bar() | ||
{ | ||
assert(j == 7); | ||
foo(); | ||
printf("bar\n"); | ||
} | ||
|
||
template def() | ||
{ | ||
alias int defint; | ||
|
||
static this() | ||
{ | ||
printf("def.static this()\n"); | ||
j = 7; | ||
} | ||
|
||
//void mem(int){} | ||
void mem() | ||
{ | ||
printf("def().mem()\n"); | ||
} | ||
} | ||
|
||
def!().defint x; | ||
|
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import std.c.stdio; | ||
|
||
import mul9377a, mul9377b; | ||
|
||
int main() | ||
{ | ||
printf("main\n"); | ||
abc(); | ||
def!().mem(); | ||
pragma(msg, def!().mem.mangleof); | ||
return 0; | ||
} | ||
|
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
src=runnable${SEP}extra-files | ||
dir=${RESULTS_DIR}${SEP}runnable | ||
|
||
if [ $OS == "win32" -o $OS == "win64" ]; then | ||
LIBEXT=.lib | ||
else | ||
LIBEXT=.a | ||
fi | ||
libname=${dir}${SEP}lib9377${LIBEXT} | ||
|
||
$DMD -m${MODEL} -I${src} -of${libname} -c ${src}${SEP}mul9377a.d ${src}${SEP}mul9377b.d -lib | ||
$DMD -m${MODEL} -I${src} -of${dir}${SEP}mul9377 ${src}${SEP}multi9377.d ${libname} | ||
|
||
rm ${dir}/{lib9377${LIBEXT},mul9377${OBJ},mul9377${EXE}} | ||
|