CTFE and RTFE results differ (aliasing)

kdevel kdevel at vogtner.de
Mon May 12 12:01:18 UTC 2025


On Monday, 5 May 2025 at 17:15:57 UTC, kdevel wrote:
> ```
> auto foo (ubyte [4] s)
> {
>    auto u = s;
>    ubyte [4] tmp = u;
> ```

When I put `shared` in front of that definition the unittest 
passes.

> ```
>    u[0] = tmp [3];
>    u[1] = tmp [2];
>    u[2] = tmp [1];
>    u[3] = tmp [0];
>    return u;
> }
> ```

I appreciate if sb. with a GH account could file the issue with 
the original code as bug.


More information about the Digitalmars-d-learn mailing list