D Compiler Bug?

Nemanja Boric dlang at nemanjaboric.com
Wed Jan 30 10:46:58 UTC 2019


On Tuesday, 29 January 2019 at 00:17:22 UTC, Adam D. Ruppe wrote:
> On Monday, 28 January 2019 at 23:57:09 UTC, Bottled Gin wrote:
>> [...]
>
> Mine is actually older, 1.12-beta but I was wrong; it actually 
> did happen, I was just compiling it wrong. Sorry, my mistake.
>
> So yeah, bug confirmed. Strange: it only happens with separate 
> compilation. If you compile directly with ldc2 *.d, it all 
> works.
>
> The vtable seems to be wrapping around. So when we call func7, 
> it goes back to func, func8 goes to func1, if we were to add a 
> func9, it goes to func2.
>
> ldc2 *.d # works correctly
>
> for i in *.d; do ldc2 -c $i; done;
> ldc2 *.o # produces the wrong code
>
>
> huh, this is totally weird. And it happens with dmd as well as 
> ldc, so it isn't a compiler specific thing; we have a frontend 
> bug.
>
> I gotta run, will look more later though.

I suggest to open the issue in bugzilla as well. This post will 
soon disappear from the first page.


More information about the Digitalmars-d mailing list