www.digitalmars.com         C & C++   DMDScript  

D - [BUG] Linker Error

reply Manfred Nowak <svv1999 hotmail.com> writes:
WinXP dmd 0.82

<code>
void main(){
  version(err)
    static int[ 9150465] arr;
  else
    static int[ 9150464] arr;
}
</code>

yields a linker error when compiled with version=err.

So long!
Apr 18 2004
parent reply "Walter" <walter digitalmars.com> writes:
"Manfred Nowak" <svv1999 hotmail.com> wrote in message
news:c5v850$p2u$1 digitaldaemon.com...
 WinXP dmd 0.82

 <code>
 void main(){
   version(err)
     static int[ 9150465] arr;
   else
     static int[ 9150464] arr;
 }
 </code>

 yields a linker error when compiled with version=err.
Yes, it's a known bug in optlink that it fails with enormous static data arrays. The workaround is to new them.
Apr 18 2004
parent reply Manfred Nowak <svv1999 hotmail.com> writes:
Walter wrote:

 Yes, it's a known bug in optlink that it fails with enormous static data
 arrays. The workaround is to new them.
It is time to fix that: under Win64 the linker goes into an infinite loop. So long!
Apr 18 2004
parent Ilya Minkov <minkov cs.tum.edu> writes:
Manfred Nowak schrieb:

 It is time to fix that: under Win64 the linker goes into an infinite loop.
There is another linker which fixes that here: http://cmeerw.org/prog/owtools/ Walter has said his OPTLINK refuses to be changed, since it's a huge tool written all in handoptimized assembly. -eye
Apr 19 2004