Bug 6071 – BigInt initialization causes compiler to hang
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2011-05-28T19:42:00Z
Last change time
2011-08-30T21:12:48Z
Assigned to
nobody
Creator
paul.d.anderson
Comments
Comment #0 by paul.d.anderson — 2011-05-28T19:42:52Z
The following code compiles:
import std.bigint;
import std.stdio;
public static void main() {
writeln("Hello, world!");
BigInt big = BigInt(0);
}
But this code causes the compiler to enter an endless loop:
import std.bigint;
import std.stdio;
public BigInt big = BigInt(0);
public static void main() {
writeln("Hello, world!");
}
This seems to be generally true for any initialization of a BigInt variable outside a function.
Using dmd -v, with source code in bigtest.d, it hangs at "semantic2 bigtest".
Comment #1 by paul.d.anderson — 2011-08-30T21:12:48Z