long compile time 2.023 (few lines of code)

Denis Koroskin 2korden at gmail.com
Fri Jan 23 11:34:57 PST 2009


Saaa Wrote:

> The following code takes too long to compile (I kill link.exe to stop it)
> dmd 2.023 bud -full - cleanup
> 
> --
> module project.main;
> 
> import project.bug;
> 
> void main()
> {
> 
> }
> --
> module project.bug;
> 
> struct Struct
> {
>  uint number;
>  int[6] array;
>  byte[9] array2;
> }
> Struct structs[1_000_000];
> --
> 
> Multiple variations on the struct seem to have the long compile time 
> effect.. allignment problem?
> 
> 

Slightly reduced test case that reproduces the same problem:

module bug;

struct Struct
{
uint number;
int[6] array;
byte[9] array2;
}
Struct structs[1_000_000];

void main() {}

FWIW, it gives me the following error message when compiled with D1.029 (might help to debug):

Unexpected OPTLINK Termination at EIP=0040E0DE
EAX=00DC0000 (changes)
EBX=00431D10
ECX=00000A90
EDX=000008C2
ESI=845511F5
EDI=00DC15C0 (changes)
EBP=0012FFF0
ESP=0012FF58
First=00402000

D1.032+ just hang.

Worth putting into bugzilla, I think.


More information about the Digitalmars-d-learn mailing list