[Issue 24752] New: betterC memset link errors with template+array
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Sep 8 11:02:43 UTC 2024
https://issues.dlang.org/show_bug.cgi?id=24752
Issue ID: 24752
Summary: betterC memset link errors with template+array
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: b42 at i64.mooo.com
Possibly related to other array `memset` errors already reported before. The
following code fails to link with `dmd` but works fine with `ldc2` on:
- Void Linux
- DMD64 D Compiler v2.101.1
- Args: `-betterC`
```
void fn(T, int N)(const T[N] arr) {
}
extern (C) void main() {
fn([1, 2]);
fn([1, 2, 3]);
fn([1, 2, 2]);
// same size array with different values fails
}
```
source/bug.d:(.text.main[main]+0x60): undefined reference to `_memset32'
--
More information about the Digitalmars-d-bugs
mailing list