https://issues.dlang.org/show_bug.cgi?id=18461
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Component|phobos |dmd --- Comment #7 from [email protected] --- Good code generated with `-O -inline` (no `-release`): ---- 0000000000000000 <_Dmain>: 0: 55 push rbp 1: 48 8b ec mov rbp,rsp 4: 48 83 ec 10 sub rsp,0x10 8: 48 c7 45 f8 10 00 00 mov QWORD PTR [rbp-0x8],0x10 f: 00 10: 48 8d 45 f8 lea rax,[rbp-0x8] 14: 48 0f ba 20 04 bt QWORD PTR [rax],0x4 ---- Bad code with `-release -O -inline`: ---- 0000000000000000 <_Dmain>: 0: 55 push rbp 1: 48 8b ec mov rbp,rsp 4: 48 83 ec 10 sub rsp,0x10 8: 48 8d 45 f8 lea rax,[rbp-0x8] c: 48 0f ba 20 04 bt QWORD PTR [rax],0x4 ---- Note that `mov QWORD PTR [rbp-0x8],0x10` is missing in the bad code. I.e., `test_val` doesn't get initialized. --
