D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5633 - [CTFE] ICE(constfold.c): is expression with struct, struct pointer, array literal...
Summary: [CTFE] ICE(constfold.c): is expression with struct, struct pointer, array lit...
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86 Windows
: P2 normal
Assignee: No Owner
URL:
Keywords: ice-on-valid-code
: 6159 (view as issue list)
Depends on:
Blocks:
 
Reported: 2011-02-21 09:57 UTC by bearophile_hugs
Modified: 2011-06-17 01:10 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2011-02-21 09:57:00 UTC
A problem found by Matthias Pleh:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=24915


struct Foo {}
void main() {
    Foo f;
    bool b = &f is cast(Foo*)0;
}


DMD 2.052 gives:
Assertion failure: '0' on line 875 in file 'constfold.c'
Comment 1 Trass3r 2011-02-21 10:27:46 UTC
Isn't this an ICE then?
Comment 2 Don 2011-02-21 11:34:27 UTC
(In reply to comment #1)
> Isn't this an ICE then?

Certainly is!
Comment 3 yebblies 2011-06-16 01:50:42 UTC
*** Issue 6159 has been marked as a duplicate of this issue. ***