www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9790] New: Internal error when compiling a invalid variable in template (in expression.c and backend\evalu8.c)

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

           Summary: Internal error when compiling a invalid variable in
                    template (in expression.c and backend\evalu8.c)
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: enjouzensyou.boinc gmail.com


--- Comment #0 from Kazuki Komatsu <enjouzensyou.boinc gmail.com> 2013-03-23
06:55:07 PDT ---
/** NG
*DMD version : git 8f9fe3b
(https://github.com/D-Programming-Language/dmd/commit/8f9fe3ba2dbeae16effc52310ed8ab82bf5af5fc)

e = 00478AC0, ty = 35
_error_ 00A5C680
e = 00478AC0, ty = 35
_error_ 00A5C680
Internal error: backend\evalu8.c 279


*DMD version : 2.062

Assertion failure: '0' on line 2178 in file 'expression.c'
*/
template foo()
{
    enum bool _foo = _Unused_._unused_;

    enum bool foo = _foo;
}


/** OK : (Compile Error)
C:\d_programming\dtest.d(29): Error: undefined identifier _Unused_
C:\d_programming\dtest.d(35): Error: template instance dtest.bar!() error
instantiating
*/
template bar()
{
    enum bool bar = _Unused_._unused_;
}


unittest{
    assert(foo!());
    //assert(bar!());
}

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 23 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9790


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |accepts-invalid, ice, pull


--- Comment #1 from Kenji Hara <k.hara.pg gmail.com> 2013-03-26 08:56:52 PDT ---
https://github.com/D-Programming-Language/dmd/pull/1800

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 26 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9790



--- Comment #2 from github-bugzilla puremagic.com 2013-03-30 16:20:23 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ed0f8b803a8677bf099810d62f2cc85954d2cc3b
fix Issue 9790 - Internal error when compiling a invalid variable in template

1. Remove gagging in VarDeclaration::semantic
2. Commit type in StructLiteralExp::castTo like as StringExp and NullExp
   It's necessary to avoid std.traits unittest breaking.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 30 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9790


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 30 2013