May 25, 2006
On DMD 0.158, Windows XP, the compiler goes into an endless loop until it runs out of memory when faced with this code:

struct STRUCTA {
  union {
    int a;
    long b;
  }
  STRUCTB c;
}

struct STRUCTB {
  int a;
}

If STRUCTB is defined before STRUCTA, or if STRUCTB is a class or interface, there's no problem. Also, take away the union and it compiles fine.

This did not occur in previous releases.

John.
June 01, 2006
John C schrieb am 2006-05-25:
> On DMD 0.158, Windows XP, the compiler goes into an endless loop until it runs out of memory when faced with this code:
>
> struct STRUCTA {
>    union {
>      int a;
>      long b;
>    }
>    STRUCTB c;
> }
>
> struct STRUCTB {
>    int a;
> }
>
> If STRUCTB is defined before STRUCTA, or if STRUCTB is a class or interface, there's no problem. Also, take away the union and it compiles fine.
>
> This did not occur in previous releases.

Added to DStress as http://dstress.kuehne.cn/run/s/struct_25_A.d http://dstress.kuehne.cn/run/s/struct_25_B.d http://dstress.kuehne.cn/run/s/struct_25_C.d http://dstress.kuehne.cn/run/s/struct_25_D.d http://dstress.kuehne.cn/run/s/struct_25_E.d http://dstress.kuehne.cn/run/s/struct_25_F.d

Thomas