Bug 22574 – Compiler segfaults on `template test(x* x)`

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-12-07T04:03:32Z
Last change time
2021-12-14T10:34:35Z
Assigned to
No Owner
Creator
mhh

Comments

Comment #0 by maxhaton — 2021-12-07T04:03:32Z
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).
Comment #1 by dlang-bot — 2021-12-07T04:54:06Z
@maxhaton created dlang/dmd pull request #13393 "Issue 22574 - Compiler segfaults on `template test(x* x)`" mentioning this issue: - Issue 22574 - Compiler segfaults on `template test(x* x)` https://github.com/dlang/dmd/pull/13393
Comment #2 by dlang-bot — 2021-12-10T13:46:05Z
dlang/dmd pull request #13393 "Issue 22574 - Compiler segfaults on `template test(x* x)`" was merged into stable: - 84ab8ce81d1d16da42658c9c27e6a653c8a6ea80 by Max Haughton: Fix Issue 22574 - Compiler segfaults on `template test(x* x)` https://github.com/dlang/dmd/pull/13393
Comment #3 by dlang-bot — 2021-12-14T10:34:35Z
dlang/dmd pull request #13421 "merge stable" was merged into master: - 79090aca3716b35be7b38789505eda14909c2b04 by Max Haughton: Issue 22574 - Compiler segfaults on `template test(x* x)` (#13393) * Fix Issue 22574 - Compiler segfaults on `template test(x* x)` * Incorporate razvan review * Fix build for Solaris/Illumos Fix Issue 22573 - DMD compiler errors on Illumos/Solaris Co-authored-by: Brian Callahan <[email protected]> https://github.com/dlang/dmd/pull/13421