[Issue 1140] ICE(cod1.c) casting last function parameter to 8 byte value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 7 06:31:20 PDT 2009


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


Don <clugdbug at yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE(cod1.c) casting last    |ICE(cod1.c) casting last
                   |function parameter to       |function parameter to 8
                   |struct.                     |byte value


--- Comment #4 from Don <clugdbug at yahoo.com.au> 2009-10-07 06:31:19 PDT ---
Even simpler test case shows it's nothing to do with structs! It just happens
when casting the last parameter, **which is passed in EAX, not on the stack**,
to an 8-byte value -- either an 8-byte struct or a long/ulong.
Although this code is legal, it's surely a bug. It would be OK for the compiler
to generate an error message.

long foo(int y) {
    return *cast(long*)(&y);
}

-- 
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