[Issue 2665] ICE(cod4.c) on certain const struct function return types

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Aug 20 07:45:11 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2665


HOSOKAWA Kenchi <hskwk at inter7.jp> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |hskwk at inter7.jp




--- Comment #3 from HOSOKAWA Kenchi <hskwk at inter7.jp>  2009-08-20 07:45:11 PDT ---
(In reply to comment #0)

here is (probably) another case of this problem.

struct A {}

struct B {
    const A a;
}

B f() {
    return B(A());
}

Internal error: ..\ztc\cod4.c 354 @ DMD2.031



"const(struct)" is the common component for the issues related to ICE(cod4.c)
35#.
Here is a list of problematic code:
In the function "cdeq" which generates code for an assignment

 sz = tysize[tyml];
 assert((int)sz > 0); <- failed this assertion.

where tyml is a type of lvalue, sz represents # of bytes to transfer.

This issue is apparently due to bypass of type-size{tysize} registration for
const(struct), besides registration for struct itself is done.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list