digitalmars.D.bugs - [Issue 21044] New: [CTFE] Infinite loop in ForStatement::interpret
- d-bugmail puremagic.com (27/27) Jul 13 2020 https://issues.dlang.org/show_bug.cgi?id=21044
https://issues.dlang.org/show_bug.cgi?id=21044 Issue ID: 21044 Summary: [CTFE] Infinite loop in ForStatement::interpret Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: ibuclaw gdcproject.org Found on one iteration of mechanically reduced code (still dozens of files, thousands of lines of code). Will copy it and reduce it further, but I suspect that the final product will be code that looks like: --- int foo() { for (;;) { } return 0; } static assert(foo() == 0); --- If that is the case, then the compiler really should have proper detection for this, to bail and error out if it finds a loop that never exits during CTFE. --
Jul 13 2020