[Issue 11435] -O optimization flag causes invalid 32 bit codegen

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Wed Jul 23 12:09:55 PDT 2014


https://issues.dlang.org/show_bug.cgi?id=11435

--- Comment #8 from safety0ff.bugz <safety0ff.bugz at gmail.com> ---
I managed to work around this issue by modifying the following code from
src/backend/cod1.c: (line ~3573)

    if (sz <= REGSIZE)
    {   // Watch out for single byte quantities being up
        // against the end of a segment or in memory-mapped I/O
        if (!(config.exe & EX_flat) && szb == 1)
            break;
        goto L1;            // can handle it with loadea()
    }

I changed the condition to:
    if (szb < REGSIZE)
        break;

I did not test further fixes since this was good enough for me.
This should be enough information to create a "proper" fix.

--


More information about the Digitalmars-d-bugs mailing list