www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 23331] New: implicit cast from noreturn crashes compiler in


          Issue ID: 23331
           Summary: implicit cast from noreturn crashes compiler in
                    various ways
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: critical
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: Ajieskola gmail.com

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.

Sep 10 2022