32-bit DMD compiled programs prints "segmentation fault"

H. S. Teoh hsteoh at quickfur.ath.cx
Tue Nov 5 06:38:24 UTC 2019


On Tue, Nov 05, 2019 at 02:55:58AM +0000, Exil via Digitalmars-d wrote:
> On Sunday, 3 November 2019 at 19:28:41 UTC, Suleyman wrote:
[...]
> > Translating the backend from C to D was a step in the right
> > direction, but it still looks like C. Maybe it can be modernized.
> > But Walter has a pile of more important work at all levels,
> > language, frontend, and backend, so lesser the dependence on Walter
> > is except for getting approval the more can be achieved in parallel.
> 
> Modernizing isnt the issue.
> 
> Wouldn't you agree that LLVM has the absolute least dependence on
> Walter :)?  All arguments you've made are all basically why LDC is the
> better option than anything that could be done with a custom backend.
> Its just a waste of resources, and the quality of LDC in comparison to
> DMD speaks volumes, especially when you consider LDC is maintained
> mostly by a single individual.

For the past several releases now, LDC has been closely tracking the
latest DMD releases. If codegen quality is important to you, just use
LDC instead. You won't miss much at all.  I've been considering to do
that myself as well (in fact, one of my projects now defaults to LDC,
and it may well be that I'll start using LDC by default sometime in the
near future).  I really only use DMD for one-off script-like programs
and for Phobos bugfixing these days, or where performance isn't a top
priority.  I've repeated many times that DMD consistently produces
binaries that run 20-30% slower than binaries produced by LDC (for
CPU-intensive tasks). So where performance or codegen quality is an
issue, I recommend just using LDC completely.

It's not so easy to convince Walter to give up the backend that he's
been working on for decades. :-D  And he doesn't really need to since we
have LDC, and LDC has been closely tracking DMD releases so staying
up-to-date with latest D developments isn't even a big issue anymore.
(LDC's frontend is identical to DMD's so there's no difference there.)


T

-- 
Everybody talks about it, but nobody does anything about it!  -- Mark Twain


More information about the Digitalmars-d mailing list