Bug 6720 – ICE(cod1.c) casting return of void function to bool
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Linux
Creation time
2011-09-23T12:20:00Z
Last change time
2015-06-09T05:11:50Z
Keywords
ice
Assigned to
clugdbug
Creator
cokebuttle
Comments
Comment #0 by cokebuttle — 2011-09-23T12:20:50Z
When compiling following code:
void main() {
bool x = cast(bool)main();
}
The compiler aborts with following error message:
Internal error: ../ztc/cod1.c 1909
This is an error message from dmd version 2.055.
Comment #1 by clugdbug — 2011-09-23T23:07:30Z
Not a regression. Applies even to prehistoric versions of D (same behaviour on D0.050).
Not specific to main().
Comment #2 by clugdbug — 2012-01-30T10:54:29Z
I've made a fix for this.
Comment #3 by github-bugzilla — 2012-01-30T23:22:15Z