Thread overview
[Issue 7252] New: ICE: 'global.errors' on line 4893 in file 'template.c'
Jan 09, 2012
Andrej Mitrovic
[Issue 7252] ICE(template.c): 'global.errors' on line 4893 in file 'template.c'
Dec 25, 2012
Kenji Hara
Dec 25, 2012
Kenji Hara
Jan 03, 2013
Walter Bright
January 09, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7252

           Summary: ICE: 'global.errors' on line 4893 in file 'template.c'
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: andrej.mitrovich@gmail.com


--- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-01-09 06:38:05 PST ---
import std.conv;

//~ alias const(char)* function() CFunc;  // fixed version
alias const char* function() CFunc;

void main()
{
    CFunc cFunc;
    auto name = to!string(cFunc());
}

The fixed version compiles, the one below it produces an ICE: Assertion failure: 'global.errors' on line 4893 in file 'template.c'

abnormal program termination

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 25, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7252



--- Comment #1 from Kenji Hara <k.hara.pg@gmail.com> 2012-12-24 17:54:52 PST ---
Reduced test case:

----
alias char* function() Func;
// The error disappears by masking this.

alias const char* function() CFunc;

void to(S)(S) { }

void main()
{
    CFunc cFunc;
    to(cFunc());
}
----

It seems a kind of incorrect type merging issue.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
December 25, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7252


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull


--- Comment #2 from Kenji Hara <k.hara.pg@gmail.com> 2012-12-24 19:23:15 PST ---
https://github.com/D-Programming-Language/dmd/pull/1404

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 03, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7252



--- Comment #3 from github-bugzilla@puremagic.com 2013-01-02 22:35:31 PST ---
Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/128c9fc79a4f12382c1a88213f8bb3afa3c0a069
fix Issue 7252 - ICE(template.c): 'global.errors' on line 4893 in file
'template.c'

https://github.com/D-Programming-Language/dmd/commit/1aaeb4a8a1c9bf74fd1c1fb64c4820b0fcdbebab Merge pull request #1404 from 9rnsr/fix7252

Issue 7252 - ICE(template.c): 'global.errors' on line 4893 in file 'template.c'

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
January 03, 2013
http://d.puremagic.com/issues/show_bug.cgi?id=7252


Walter Bright <bugzilla@digitalmars.com> changed:

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


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