Any guides on debugging DMD crash?

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Mar 24 17:55:22 UTC 2020


On Tue, Mar 24, 2020 at 05:33:26PM +0000, bachmeier via Digitalmars-d wrote:
[...]
> I can only give one data point, but I started using D in 2013 and have
> never run into a compiler bug. My use case is primarily as a better C
> (using the full D language, but working with C libraries). I use
> mostly basic D features, none of the fancy stuff, so I'm probably not
> venturing into the less-tested parts of the language very often.

I've been using D since around late 2011 / early 2012, and have run into
a number of DMD bugs -- wrong codegens, ICEs, and problems with the
optimization flags.  I'd say the majority are front-end bugs, most of
which have been fixed since, and a smaller number of backend bugs.  It's
already bad enough that the backend produces code with not-so-great
performance; what makes it worse is that some of the backend bugs I've
run into are triggered by optimization flags, meaning that my only
recourse was to live off *unoptimized DMD output*.

Recently I've switched to LDC for optimized builds, and it's been great.
I still use DMD occasionally for subsystem development -- the lightning
fast turnaround times is great for the code-compile-test cycle -- but
overall I've been finding that LDC's superior codegen is more than worth
the cost of a few added seconds to compile times.


T

-- 
People demand freedom of speech to make up for the freedom of thought which they avoid. -- Soren Aabye Kierkegaard (1813-1855)


More information about the Digitalmars-d mailing list