← Back to index
|
Original Bugzilla link
Bug 727 – -inline: missing return in short function causes incorrect code generation
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-12-23T07:09:00Z
Last change time
2014-02-15T13:20:59Z
Keywords
wrong-code
Assigned to
bugzilla
Creator
thomas-dloop
Comments
Comment #0
by thomas-dloop — 2006-12-23T07:09:08Z
# # int test(int i){ # if(i==0){ # return 2; # } # } # # int main(){ # assert(test(0)==2); # try{ # test(1); # }catch{ # return 0; # } # assert(0); # } # success: dmd return_06.d && ./return_06 failure: dmd -inline return_06.d && ./return_06 GDC isn't affected by this. test case:
http://dstress.kuehne.cn/run/return_06.d
Comment #1
by bugzilla — 2007-10-31T21:50:37Z
Works dmd 1.022 and 2.006.