[Issue 18730] dmd miscompiles core.bitop.bt with -O

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 5 19:25:54 UTC 2018


https://issues.dlang.org/show_bug.cgi?id=18730

--- Comment #3 from ag0aep6g <ag0aep6g at gmail.com> ---
(In reply to Ketmar Dark from comment #1)
> it segfaults on x86 too. but i won't change "hardware" field, 'cause it
> seems that with x86_64 there is a codegen bug too, and fixing segfault for
> x86_64 should automatically fix it for x86.

I think we can split this in two:

1) Fix the x86-64 issue presented here by fixing the register size. This is the
easy part. It doesn't fix the situation on x86.

2) File a new issue for the larger problem: core.bitop.bt's bitnum parameter is
a size_t when it should be a ptrdiff_t. Then bt's body has to be adjusted for
that, because D doesn't have negatives indices. And dmd has to be adjusted to
recognize the new body.

--


More information about the Digitalmars-d-bugs mailing list