2549 – Segfault on array multiplication.

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 2549 - Segfault on array multiplication.
Summary: Segfault on array multiplication.
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: patch, wrong-code
Depends on:
Blocks:
Reported: 2008年12月30日 16:43 UTC by David Simcha
Modified: 2015年06月09日 01:20 UTC (History)
4 users (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description David Simcha 2008年12月30日 16:43:42 UTC
import std.stdio;
void main() {
 double[] foo = [1.0,2,3,4,5].dup;
 writeln(foo[] * 2.0);
}
Output of this program on Win32:
object.Error: Access Violation
[
Comment 1 Trass3r 2010年01月17日 17:28:45 UTC
Also note the following:
float[] a = [0.f, 0.5f, 1.0f, 1.5f, 2.0f, 2.5f];
float[] b = [0.f, 0.5f, 1.0f, 1.5f, 2.0f, 2.5f];
writeln(a[] * b[]); // compiles, but results in access violation
writeln(a[] + b[]); // array operation a[] + b[] not implemented
This bug also is in relation to
http://d.puremagic.com/issues/show_bug.cgi?id=3066 
Comment 2 Don 2010年04月28日 21:20:06 UTC
The patch for bug 3522 fixes this.
Comment 3 Walter Bright 2010年04月29日 21:05:47 UTC
Changeset 460
Comment 4 Don 2010年05月05日 19:05:22 UTC
Fixed DMD2.044


AltStyle によって変換されたページ (->オリジナル) /