[Issue 4709] New: const struct leads DMD terminated abnormally
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 22 00:35:50 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4709
Summary: const struct leads DMD terminated abnormally
Product: D
Version: D2
Platform: x86
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bitworld at qq.com
--- Comment #0 from Heromyth <bitworld at qq.com> 2010-08-22 00:35:47 PDT ---
The following code will lead DMD terminated abnormally. After getting rid of
the "const" in "const struct SB_uint8", this termination problem is missing.
===================
import std.stdio;
/*
struct D_Shift {
ushort symbol;
ubyte shift_kind;
ubyte op_assoc;
int op_priority;
int term_priority;
int action_index;
}
*/
// the bug is here
const struct SB_uint8 {
D_Shift **shift;
ubyte *[2] scanner_block;
}
int main(string[] args)
{
return 0;
}
/*
Z:\>dmd main.d
main.d(17): Error: identifier 'D_Shift' is not defined
main.d(17): Error: D_Shift is used as a type
main.d(20): Error: identifier 'D_Shift' is not defined
main.d(20): Error: D_Shift is used as a type
Assertion failure: 'tn->mod & MODimmutable || tn->mod & MODconst' on line 875
in
file 'mtype.c'
abnormal program termination
*/
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list