June 04, 2022
https://issues.dlang.org/show_bug.cgi?id=19946

Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com

--- Comment #7 from Walter Bright <bugzilla@digitalmars.com> ---
Razvan, your idea is the right approach. mhh, you're right, but this refactoring should be in a separate PR.

--
June 08, 2022
https://issues.dlang.org/show_bug.cgi?id=19946

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |cruz.dlang@netsiteinnovatio
                   |                            |ns.com

--- Comment #8 from Dennis <dkorpel@live.nl> ---
*** Issue 20689 has been marked as a duplicate of this issue. ***

--
June 08, 2022
https://issues.dlang.org/show_bug.cgi?id=19946

Dennis <dkorpel@live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |azi.hassan@live.fr

--- Comment #9 from Dennis <dkorpel@live.nl> ---
*** Issue 17778 has been marked as a duplicate of this issue. ***

--
June 08, 2022
https://issues.dlang.org/show_bug.cgi?id=19946

--- Comment #10 from Dennis <dkorpel@live.nl> ---
(In reply to RazvanN from comment #5)
> I think that long-term the best solution would be to lower the code in the frontend and, indeed, lower the hooks to templates.

I agree. My only reservation is that LDC and GDC seem to handle setting arrays in -betterC fine, but with a frontend lowering they might have a performance regression unless they start recognizing the new template hooks.

--
June 08, 2022
https://issues.dlang.org/show_bug.cgi?id=19946

--- Comment #11 from Dlang Bot <dlang-bot@dlang.rocks> ---
@dkorpel created dlang/druntime pull request #3837 "Issue 19946 - Add memset template function" mentioning this issue:

- Issue 19946 - Add memset template function

https://github.com/dlang/druntime/pull/3837

--
November 16, 2022
https://issues.dlang.org/show_bug.cgi?id=19946

Richard Cattermole <alphaglosined@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |alphaglosined@gmail.com

--- Comment #12 from Richard Cattermole <alphaglosined@gmail.com> ---
Another example that can trigger this (in -betterC):

```d
extern(C) void main() {
    wchar[2] got;
    func(got);
}

void func(out wchar[2] v) {
}
```

Why do these hooks even exist? They could be a simple rewrite to a foreach loop in the compiler and not depend on the runtime at all, let alone functions in rt.

--
December 27, 2022
https://issues.dlang.org/show_bug.cgi?id=19946

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |backend

--- Comment #13 from Iain Buclaw <ibuclaw@gdcproject.org> ---
This works with GDC and LDC.  The problem is in the dmd backend.

--
December 30, 2022
https://issues.dlang.org/show_bug.cgi?id=19946

--- Comment #14 from Walter Bright <bugzilla@digitalmars.com> ---
Start towards fixing this:

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

--
December 30, 2022
https://issues.dlang.org/show_bug.cgi?id=19946

--- Comment #15 from Richard Cattermole <alphaglosined@gmail.com> ---
(In reply to Walter Bright from comment #14)
> Start towards fixing this:

https://github.com/dlang/dmd/pull/14761

--
December 30, 2022
https://issues.dlang.org/show_bug.cgi?id=19946

Dlang Bot <dlang-bot@dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull

--- Comment #16 from Dlang Bot <dlang-bot@dlang.rocks> ---
@WalterBright created dlang/dmd pull request #14762 "fix Issue 19946 - In betterC filling an array with a non-zero value f…" fixing this issue:

- fix Issue 19946 - In betterC filling an array with a non-zero value fails for types of size > 1

https://github.com/dlang/dmd/pull/14762

--