http://d.puremagic.com/issues/show_bug.cgi?id=9193
Summary: Wrong code with mixing -inline/non-inline modules,
nested functions and templates
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: wrong-code
Severity: critical
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Vladimir Panteleev <[email protected]> 2012-12-22
00:03:08 PST ---
=== a.d ===
import b;
void main() { f(); }
=== b.d ===
auto T(alias pred)() { return pred; }
auto f()
{
string var="cheese";
void test() { assert(var=="cheese"); }
T!test();
}
=== compilation instructions ===
dmd -c b.d
dmd -inline a.d b.obj
=== result ===
The assert fails. If -inline is removed from the compilation command, the
assert passes.
This bug causes dirEntries with a wildcard to fail when programs are compiled
with -inline.
Marking as critical since wrong-code bugs appearing only in release builds are
hard to track (Heisenbugs).
Tested on Windows/32 and Linux/64.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------