Skip to content

Commit

Permalink
Merge pull request #4188 from MartinNowak/fix13774
Browse files Browse the repository at this point in the history
regression test for Issue 13774
  • Loading branch information
9rnsr committed Dec 3, 2014
2 parents 2044fdb + 9c2e3d5 commit 26ec5a6
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/runnable/extra-files/lib13774a.d
@@ -0,0 +1,11 @@
module lib13774a;

void comdef()()
{
__gshared int a;
}

void use1()
{
comdef();
}
7 changes: 7 additions & 0 deletions test/runnable/extra-files/lib13774b.d
@@ -0,0 +1,7 @@
module lib13774b;
import lib13774a;

void use2()
{
comdef();
}
18 changes: 18 additions & 0 deletions test/runnable/test13774.sh
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

src=runnable${SEP}extra-files
dir=${RESULTS_DIR}${SEP}runnable
output_file=${dir}/test13774.sh.out

if [ $OS == "win32" -o $OS == "win64" ]; then
LIBEXT=.lib
else
LIBEXT=.a
fi

$DMD -m${MODEL} -I${src} -lib -od${dir} ${src}${SEP}lib13774a.d || exit 1
$DMD -m${MODEL} -I${src} -lib -od${dir} ${src}${SEP}lib13774b.d ${dir}${SEP}lib13774a${LIBEXT} || exit 1

rm ${dir}/{lib13774a${LIBEXT},lib13774b${LIBEXT}}

echo Success >${output_file}

0 comments on commit 26ec5a6

Please sign in to comment.