Bug 23331 – implicit cast from noreturn crashes compiler in various ways
Status
RESOLVED
Resolution
WORKSFORME
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2022-09-10T20:57:10Z
Last change time
2023-10-14T04:29:52Z
Keywords
backend, pull
Assigned to
No Owner
Creator
Ate Eskola
Comments
Comment #0 by Ajieskola — 2022-09-10T20:57:10Z
Defining any of these three functions in latest master will crash the compiler:
--------
auto fun(){return double(new noreturn[](0)[0]);}
auto gun(){return double(assert(0));}
auto hun(){return int(assert(0));}
--------
The underlying reason may or may not be same, since a different assertion trips in the compiler for each, located in different a source file for each of them.