Issue 24859 - Relational expression for dynamic arrays with vector elements fails to compile
Summary: Relational expression for dynamic arrays with vector elements fails to compile
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: druntime (show other issues)
Version: D2
Hardware: All All
: P1 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-13 22:34 UTC by Paul Backus
Modified: 2024-12-07 13:43 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Paul Backus 2024-11-13 22:34:55 UTC
As of DMD 2.109.1, the following program fails to compile:

---
void main()
{
    __vector(int[4])[] a, b;
    auto result = a < b;
}
---

The error message is:

---
/usr/include/dmd/druntime/import/core/internal/array/comparison.d(77): Error: expression `r` of type `const(__vector(int[4]))` does not have a boolean value
/usr/include/dmd/druntime/import/core/internal/array/comparison.d(77): Error: cannot implicitly convert expression `r` of type `const(__vector(int[4]))` to `int`
bug.d(4): Error: template instance `core.internal.array.comparison.__cmp!(__vector(int[4]))` error instantiating
---
Comment 1 dlangBugzillaToGithub 2024-12-07 13:43:58 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/17220

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB