www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4873] New: Assertion failure: '0' on line 1483 in file 'expression.c'

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4873

           Summary: Assertion failure: '0' on line 1483 in file
                    'expression.c'
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: dfj1esp02 sneakemail.com



14:12:39 PDT ---
--- test.d ---
struct HANDLE
{
    size_t Value;
    this(void *ptrValue)
    {
        Value=ptrValue;
    }
}

enum HANDLE INVALID_HANDLE_VALUE = HANDLE(-1);
static assert(INVALID_HANDLE_VALUE.Value == -1);

class File
{
    HANDLE Handle=INVALID_HANDLE_VALUE;
}
---
dmd -c test.d -w -o- -debug
--- e = 00A547EC, ty = 37 _error_ 009E16D8 Assertion failure: '0' on line 1483 in file 'expression.c' abnormal program termination --- Digital Mars D Compiler v2.048 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Sep 15 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4873




14:13:32 PDT ---
workaround: remove assert

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 15 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4873


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch



PATCH: staticassert.c, line 58.

void StaticAssert::semantic2(Scope *sc)
{
    Expression *e;

    //printf("StaticAssert::semantic2() %s\n", toChars());
    e = exp->semantic(sc);
+    if (e->op == TOKerror)
+        return;
    e = e->optimize(WANTvalue | WANTinterpret);
    if (e->isBool(FALSE))

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 05 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4873


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |FIXED



14:45:08 PDT ---
http://www.dsource.org/projects/dmd/changeset/711

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Oct 08 2010