[Issue 9167] New: A failed inlining of inner function
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Dec 16 21:04:39 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=9167
Summary: A failed inlining of inner function
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2012-12-16 21:04:38 PST ---
void main() {
int x;
int foo() {
return x;
}
int bar() {
return foo();
}
}
DMD 2.061alpha (with -O -release -inline -noboundscheck) gives this asm,
showing foo() is not inlined in bar():
main.foo:
push EAX
mov EAX, [EAX]
pop ECX
ret
main.bar:
push EAX
call near ptr _D4test4mainFZv3fooMFZi
pop ECX
ret
main:
push EAX
xor EAX, EAX
mov [ESP], EAX
pop ECX
ret
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list