https://d.puremagic.com/issues/show_bug.cgi?id=12095
Summary: Wrong code with -O -inline and final functions Product: D Version: D1 & D2 Platform: All OS/Version: All Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: clugd...@yahoo.com.au --- Comment #0 from Don <clugd...@yahoo.com.au> 2014-02-07 00:23:30 PST --- Applies to both D1 and D2. Requires -O -inline. The "if (e) " branch is taken, even though e is null. ---- int* func12095() { return null; } class Bug12095 { final void get(int a, int b) { auto e = func12095(); if (e) assert (a, "fail"); else assert (!b); } void fun(int k) { get(k, 0); } } void main() { auto yy = new Bug12095; yy.fun(0); } -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------