March 24
On Tuesday, 24 March 2020 at 16:11:40 UTC, DanielG wrote:
> On Monday, 23 March 2020 at 00:17:48 UTC, Arine wrote:
>> You'll probably have better luck using LDC2, which has a tried and proven backend LLVM. It doesn't compile as fast, but I find the few seconds is worth the trade off of not having to deal with as many compiler bugs like the one you've found here.
>
> How common is this sentiment among D developers?

There's virtually no reason to use DMD and I don't think anyone is using it seriously anymore in production. A lot of the companies switched to LDC over the last years.
A good example: the Debian/Ubuntu D maintainers didn't even bother creating a package for DMD (even though it's fully open source for more than two years now) as you want to use GDC or LDC to compile libraries or applications anyhow.

The only real reason why DMD is still the "reference compiler" and "officially recommended" is that Walter is in charge and DMD is his life work.
March 25
On Monday, 23 March 2020 at 00:17:48 UTC, Arine wrote:
> On Sunday, 22 March 2020 at 22:33:13 UTC, Matt Jones wrote:
>> Does anyone have a guide on how to debug DMD crashes? I've been getting compiler crashes on version 2.087.1 through 2.091.0 (only release mode on both Windows 10 and Linux). Version 2.086.1 was the last one that worked:
>>
>> dub run --arch=x86_64 --build=release
>>
>> C:\D\dmd2\windows\bin\dmd.exe failed with exit code -1073741795.
>>
>> Here is the smallest code snippet I could make crash: https://github.com/workhorsy/crash_dmd
>
> Since it crashes when you do a release build, this is most likely a bug in the backend. DMD's backend is known to have a lot of issues and they don't tend to be fixed as there's only a few people that actually work on it. Even if someone outside of the main D team fixes the bug, the fix won't get merged in for release as those same individuals don't bother to review those pull requests.
>
> You'll probably have better luck using LDC2, which has a tried and proven backend LLVM. It doesn't compile as fast, but I find the few seconds is worth the trade off of not having to deal with as many compiler bugs like the one you've found here.
>
> https://github.com/ldc-developers/ldc#installation

I've been trying LDC2 every couple of years. It's been a while.

I just tried building a few D apps with LDC2. I managed to get things to compile in release mode. I noticed a few of my apps work differently when compiled in DMD and LDC2. I'll have to see why they run differently. A few 3rd party libraries I use failed with strange linking errors on LDC2.

I'll have to look more into this. Looks like LDC2 is more viable now than before.
March 25
On Monday, 23 March 2020 at 19:46:33 UTC, Stefan Koch wrote:
> On Sunday, 22 March 2020 at 22:33:13 UTC, Matt Jones wrote:
>> [...]
>
> Hi, so I've found out what's going on.
>
> An assertion in CSE (Common Subexpression Elimination) fails.
> Which means that this is indeed an optimizer bug in the backend.
> I can not yet say how to fix it but is should be enough for you to file a bug report.
>
> The steps I took to find this are the following
> 1. Compile dmd with debug symbols.
> 2. use dub -v to see the compile commandline which fails.
> 3. run the commandline under gdb. (gdb --args)
> 4. look at where the failure happens.

I'll have to try this. Thanks
Next ›   Last »
1 2