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

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2012-01-09T06:38:00Z
Last change time
2013-01-03T00:31:05Z
Keywords
ice, pull
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2012-01-09T06:38:05Z
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
Comment #1 by k.hara.pg — 2012-12-24T17:54:52Z
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.
Comment #2 by k.hara.pg — 2012-12-24T19:23:15Z
Comment #3 by github-bugzilla — 2013-01-02T22:35:31Z
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'