[Issue 21954] New: stack corruption on if stmt taking a noreturn array elem as condition
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun May 23 03:25:11 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21954
Issue ID: 21954
Summary: stack corruption on if stmt taking a noreturn array
elem as condition
Product: D
Version: D2
Hardware: x86_64
OS: Linux
Status: NEW
Keywords: accepts-invalid, wrong-code
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: b2.temp at gmx.com
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
--
More information about the Digitalmars-d-bugs
mailing list