402 – compiler crash with mixin and forward reference

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 402 - compiler crash with mixin and forward reference
Summary: compiler crash with mixin and forward reference
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Windows
: P2 normal
Assignee: Walter Bright
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
Reported: 2006年10月05日 19:13 UTC by Bradley Smith
Modified: 2014年02月15日 13:19 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 Bradley Smith 2006年10月05日 19:13:46 UTC
The following may be incorrect code, but it crashes the compiler.
>dmd -c issue.d
issue.d(8): mixin Foo!(y) cannot resolve forward reference
***** Crash *****
----- issue.d -----
template Foo(alias b)
{
 int a() { return b; }
}
void main()
{
 mixin Foo!(y) y;
}
Comment 1 Thomas Kühne 2006年10月06日 02:10:36 UTC
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
d-bugmail@puremagic.com schrieb am 2006年10月06日:
> http://d.puremagic.com/issues/show_bug.cgi?id=402 
> The following may be incorrect code, but it crashes the compiler.
>
>>dmd -c issue.d
> issue.d(8): mixin Foo!(y) cannot resolve forward reference
> ***** Crash *****
>
> ----- issue.d -----
> template Foo(alias b)
> {
> int a() { return b; }
> }
>
> void main()
> {
> mixin Foo!(y) y;
> }
Added to DStress as
http://dstress.kuehne.cn/nocompile/a/alias_39_A.d
http://dstress.kuehne.cn/nocompile/a/alias_39_B.d
Thomas
-----BEGIN PGP SIGNATURE-----
iD8DBQFFJgd8LK5blCcjpWoRAqsiAJ4k1BmBv/BEl95EbKk1Cp1uCvkKiACfX+Gy
5sr7FO3j1L4vAqhazLtL+Ik=
=/INU
-----END PGP SIGNATURE-----
Comment 2 Walter Bright 2006年10月10日 03:31:15 UTC
Fixed DMD 0.169


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