Bug 4318 – compile with flag unittest, depending on the order files, Access Violation

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2010-06-15T02:24:00Z
Last change time
2012-10-21T20:46:48Z
Keywords
wrong-code
Assigned to
nobody
Creator
pavel

Comments

Comment #0 by pavel — 2010-06-15T02:24:40Z
uses dmd 2.047 main.d ------------------------ import std.stdio; int main(string[] args) { int[] a = [1,2,3,4] writeln(s); return 0; } ------------------------ one.d ------------------------ module one; import std.string; ------------------------ dmd main.d one.d -oftest -unittest //compile is successful test.exe run and give 1 2 3 4 dmd one.d main.d -oftest -unittest //compile is successful test.exe run and give object.Error: Access Violation
Comment #1 by pavel — 2010-06-15T23:26:48Z
(In reply to comment #0) > uses dmd 2.047 > > main.d > ------------------------ > import std.stdio; > > int main(string[] args) > { > int[] a = [1,2,3,4] > writeln(s); > return 0; > } > ------------------------ > one.d > ------------------------ > module one; > import std.string; > ------------------------ > > dmd main.d one.d -oftest -unittest //compile is successful > test.exe run and give > 1 2 3 4 > > dmd one.d main.d -oftest -unittest //compile is successful > test.exe run and give > object.Error: Access Violation misttype writeln(s) -> writeln(a) is ok
Comment #2 by andrej.mitrovich — 2012-10-21T20:46:48Z
Can't reproduce.