817 – const char[] = string_literal - string_literal gets included for every reference

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 817 - const char[] = string_literal - string_literal gets included for every reference
Summary: const char[] = string_literal - string_literal gets included for every reference
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P4 minor
Assignee: Walter Bright
URL:
Keywords:
Depends on:
Blocks:
Reported: 2007年01月07日 20:40 UTC by Vladimir Panteleev
Modified: 2014年02月15日 13:12 UTC (History)
0 users

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 Vladimir Panteleev 2007年01月07日 20:40:15 UTC
Program:
import std.stdio;
const char[] str = "Hello!";
void main()
{
 writefln(str);
 writefln(str);
 writefln(str);
 writefln(str);
 writefln(str);
 writefln(str);
 writefln(str);
 writefln(str);
 writefln(str);
 writefln(str);
}
The compiled file contains the string "Hello!" 11 (evelen) times.
Doesn't happen with GDC.
Comment 1 Vladimir Panteleev 2007年01月07日 20:42:06 UTC
Also, I can't spell. (eleven*)
Comment 2 Walter Bright 2007年01月27日 18:55:05 UTC
Fixed DMD 1.001


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