Any guides on debugging DMD crash?

rikki cattermole rikki at cattermole.co.nz
Tue Mar 24 18:00:09 UTC 2020


On 25/03/2020 6:55 AM, H. S. Teoh wrote:
> 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.

Similar-ish story for me.

Except I have encountered an ICE in debug info.

Along with bugs in ldc that end in a very undesirable target/compiler 
configuration.

They have since been fixed :)


More information about the Digitalmars-d mailing list