An LLVM bug that affect both LDC and SDC. Worth pushing for
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 16 12:37:54 PDT 2014
On Monday, 16 June 2014 at 19:18:29 UTC, Iain Buclaw via
Digitalmars-d wrote:
> On 16 June 2014 17:31, safety0ff via Digitalmars-d
> <digitalmars-d at puremagic.com> wrote:
>> On Monday, 16 June 2014 at 06:09:28 UTC, deadalnix wrote:
>>>
>>> http://llvm.org/bugs/show_bug.cgi?id=20049
>>>
>>> Basically when you have a closure in a closure and the whole
>>> thing get
>>> inlined, LLVM mess up, which result in compiler not being
>>> able to optimize
>>> GC allocation away.
>>>
>>> Probably worth pushing for. It does probably affect other
>>> functional
>>> languages as well, but I didn't checked.
>>
>>
>> This is the corresponding D code:
>> https://github.com/deadalnix/SDC/blob/master/tests/test0156.d
>>
>> Correct?
>
> That code shouldn't create a GC allocated closure. :o)
Change return bar to return &bar and you got one possible
candidate to trigger the bug.
More information about the Digitalmars-d
mailing list