Bug 21954 – stack corruption on if stmt taking a noreturn array elem as condition

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-05-23T03:25:11Z
Last change time
2024-12-13T19:16:30Z
Keywords
accepts-invalid, wrong-code
Assigned to
No Owner
Creator
basile-z
See also
https://issues.dlang.org/show_bug.cgi?id=21951
Moved to GitHub: dmd#19931 →

Comments

Comment #0 by b2.temp — 2021-05-23T03:25:11Z
this code returns random return codes when executed --- alias noreturn = typeof(*null); int main() { noreturn[1] a; if (a[0]){} return 0; } --- Maybe related to 21951 (initializer of noreturn). compiled with DMD git 9d718f2f8c7f34d3b616791493d9e71d7527f221
Comment #1 by robert.schadek — 2024-12-13T19:16:30Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19931 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB