mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
Fix Bugzilla 24399 - Link failure on MacOS with address=0x0 points to section(2) with no content
This commit is contained in:
parent
6139abb202
commit
985f64ba03
2 changed files with 14 additions and 0 deletions
|
@ -92,6 +92,11 @@ extern (C++) void Initializer_toDt(Initializer init, ref DtBuilder dtb, bool isC
|
||||||
if (tb.ty == Tvector)
|
if (tb.ty == Tvector)
|
||||||
tb = (cast(TypeVector)tb).basetype;
|
tb = (cast(TypeVector)tb).basetype;
|
||||||
|
|
||||||
|
if (ai.dim == 0 && tb.isZeroInit(ai.loc))
|
||||||
|
{
|
||||||
|
dtb.nzeros(cast(uint)ai.type.size());
|
||||||
|
return;
|
||||||
|
}
|
||||||
Type tn = tb.nextOf().toBasetype();
|
Type tn = tb.nextOf().toBasetype();
|
||||||
|
|
||||||
//printf("\tdim = %d\n", ai.dim);
|
//printf("\tdim = %d\n", ai.dim);
|
||||||
|
|
9
compiler/test/compilable/issue24399.d
Normal file
9
compiler/test/compilable/issue24399.d
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
// REQUIRED_ARGS: -main
|
||||||
|
// LINK:
|
||||||
|
template rt_options()
|
||||||
|
{
|
||||||
|
__gshared string[] rt_options = [];
|
||||||
|
string[] rt_options_tls = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
alias _ = rt_options!();
|
Loading…
Add table
Add a link
Reference in a new issue