Tricky DMD bug, but I have no idea how to report

H. S. Teoh hsteoh at quickfur.ath.cx
Fri Feb 8 23:48:47 UTC 2019


On Fri, Feb 08, 2019 at 11:36:03PM +0000, JN via Digitalmars-d-learn wrote:
> On Friday, 8 February 2019 at 23:30:44 UTC, H. S. Teoh wrote:
[...]
> > Pity we couldn't get rid of std.stdio.
[...]
> I can replace it with core.stdc.stdio if it's any better. Looks like
> any attempt to do a check for "x is null" hides the bug. I tried
> assert(), also tried if (x is null) throw new Exception(...)

Aha!  That's an important insight.  It's almost certain that it's caused
by a backend bug now.  So testing the value perturbs the codegen code
path enough to mask the bug / avoid the bug.  I think from this point
somebody who's familiar with the dmd backend ought to be able to track
it down reasonably easily.  (Unfortunately I'm completely unfamiliar
with that part of the dmd code.)


T

-- 
In order to understand recursion you must first understand recursion.


More information about the Digitalmars-d-learn mailing list