Bug 10829 – -inline produces wrong code

Status
RESOLVED
Resolution
INVALID
Severity
major
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-08-15T13:34:00Z
Last change time
2014-03-31T05:09:28Z
Assigned to
nobody
Creator
temtaime

Comments

Comment #0 by temtaime — 2013-08-15T13:34:12Z
I have a big project, so i cannot figure test-case now. I'll investigate in it a little later. Minimized piece of code that demonstrates the problem. static void bringToTop(GUIElement[] arr) { if(arr.length < 2) return; auto p = arr[0]; auto c = arr[1]; writefln(`c == %s`, cast(int)cast(void *)c); p._childs = c ~ p._childs.filter!(a => (writefln(`in lambda c == %s`, cast(int)cast(void *)c), a != c)).array; } GUIElement is a class. GUIElement._childs is an array of GUIElement. Output with -inline: c == 7982336 in lambda c == 0 Optput without -inline: c == 3751104 in lambda c == 3751104
Comment #1 by safety0ff.bugz — 2014-03-30T19:35:06Z
Is there any chance of getting a complete test case for this?
Comment #2 by temtaime — 2014-03-31T05:09:28Z
I think this bug report can be closed because we refused -inline. And now it generates a lot of compilation errors. Overall, -inline is still bugged.