November 25 [Issue 24881] New: ICE on attempt to compare deref of two functions ptr | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24881 Issue ID: 24881 Summary: ICE on attempt to compare deref of two functions ptr Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Keywords: accepts-invalid, ice Severity: critical Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: b2.temp@gmx.com The following input ``` void function(int) a; void function(int) b; void main() { const c = *a == *b; // assert(*a); // rejected during sema } ``` crashes dmd in the backend: > TYD func > > Program received signal SIGILL, Illegal instruction. > 0x00005555559d1756 in dmd.backend.cod3.jmpopcode(dmd.backend.el.elem*) () I think however that the program is semantically invalid and should be rejected during exp-semantics, just like the commented assertion is. -- |
Copyright © 1999-2021 by the D Language Foundation