[Issue 22574] New: Compiler segfaults on `template test(x* x)`
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Dec 7 04:03:32 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=22574
Issue ID: 22574
Summary: Compiler segfaults on `template test(x* x)`
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: maxhaton at gmail.com
Since approx 2.089.1 the following code causes the compiler to segfault
```
template segfaults(x* x)
{
}
```
```
tempseg.d(8): Error: variable `x` is used as a type
Segmentation fault (core dumped)
```
This is a result of 6ebafdcbddca5c6cb01082f062cf68e2bcf3c8c3
(https://github.com/dlang/dmd/pull/10450)
The segfault can be fixed easily but the code here stinks (i.e. the error
message is inane).
--
More information about the Digitalmars-d-bugs
mailing list