Bug 7254 – ICE(cod3.c) returning strings as static arrays

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-01-09T12:27:00Z
Last change time
2013-10-08T21:30:48Z
Keywords
ice
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2012-01-09T12:27:48Z
alias immutable(char)[1] Foo; Foo bar() { try { return ""; // wrong } catch (Exception e) { Foo result; return result; } } void main() {} DMD 2.058head: Internal error: backend\cod3.c 446
Comment #1 by bugzilla — 2013-10-06T16:06:50Z
This has nothing to do with try-catch. The following reproduces it: immutable(char)[4] bar(int i) { return "1234"; }
Comment #2 by bugzilla — 2013-10-06T16:09:18Z
Comment #3 by github-bugzilla — 2013-10-08T21:13:49Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/6c7075cad75af92f10b232ae3cc702a59a5c0b2c fix Issue 7254 - ICE(cod3.c) returning strings as static arrays https://github.com/D-Programming-Language/dmd/commit/14d3b2145f1b77edfd480f7406fe5c4ffee98f9f Merge pull request #2636 from WalterBright/fix7254 fix Issue 7254 - ICE(cod3.c) returning strings as static arrays