really stupid error

Johan j at j.nl
Fri Apr 14 10:57:45 UTC 2023


On Friday, 14 April 2023 at 07:22:13 UTC, Basile B. wrote:
> On Friday, 14 April 2023 at 05:58:16 UTC, d007 wrote:
>> On Saturday, 1 April 2023 at 18:41:26 UTC, user456 wrote:
>>>
>>> I have created this https://godbolt.org/z/ePxshnvvc but I 
>>> dont know if DMD is affected. That seems to be a bug specific 
>>> to LDC.
>>
>> Thanks.
>>
>> `thewilsonator` from github suggestion turn on `opaque 
>> pointers`, it cause ldc crashed:
>
> Yeah I've discovered to my great surprise the other day that 
> opaque pointers are not enabled yet but optionally supported. 
> By coincidence at the same time I was just celebrating the 
> transition to opaque pointers of [another 
> compiler](https://gitlab.com/styx-lang/styx/-/releases/v0.10.0)... For LDC this is more complicated because (I believe) the LLVM IR is generated from another intermediate IR so the relationship with the original AST is not so obvious.
>
> Anyway, no matter if the reg was caused by the initial support 
> for opque ptrs, LLVM GEPs were generally more simple with typed 
> pointers.

The problem was caused by invalid AST coming from the frontend 
(https://godbolt.org/z/ae7G8hccz).

Martin has changed LDC such that it can deal with such invalid 
AST here: https://github.com/ldc-developers/ldc/pull/4365

-Johan


More information about the Digitalmars-d mailing list