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: nob...@puremagic.com
        ReportedBy: bitwo...@qq.com


--- Comment #0 from Heromyth <bitwo...@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: -------

Reply via email to