Bug 13870 – [ICE] shared or immutable types can not be mapped to C++ (immutable(char))

Status
RESOLVED
Resolution
WORKSFORME
Severity
critical
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-12-17T02:00:00Z
Last change time
2020-03-21T03:56:41Z
Keywords
C++, diagnostic, ice
Assigned to
No Owner
Creator
Paul O'Neil

Comments

Comment #0 by redballoon36 — 2014-12-17T02:00:00Z
The following code produces an ICE: extern(C++) void func(immutable (char)* ch); void main() { func("hello"); } The output is;Error: ICE: shared or immutable types can not be mapped to C++ (immutable(char)) dmd: cppmangle.c:444: virtual void CppMangleVisitor::visit(Type*): Assertion `0' failed.
Comment #1 by yebblies — 2015-01-24T14:41:02Z
Only the diagnostic part of this is critical as the ICE is not something that should work, just something that should be caught earlier in compilation.