[Issue 8163] New: compiler error when assigning a static array return value

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed May 30 04:20:58 PDT 2012


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

           Summary: compiler error when assigning a static array return
                    value
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: FreeBSD
            Status: NEW
          Keywords: ice
          Severity: regression
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: dawg at dawgfoto.de


--- Comment #0 from dawg at dawgfoto.de 2012-05-30 04:22:46 PDT ---
cat > bug.d << CODE
// any combination of integral/floating point fields
// that sums up to an eightbyte triggers the bug.
template test(T...)
{
    struct Point
    {
        T fields;
    }

    enum N = 2; // N>=2 triggers the bug
    extern Point[N] bar();

    void foo()
    {
        Point[N] _ = bar();
    }
}

alias test!(long) _l;
alias test!(double) _d;
alias test!(float, float) _ff;
alias test!(int, int) _ii;
alias test!(int, float) _if;
alias test!(ushort, ushort, ushort, ushort) _SSSS;
alias test!(ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte, ubyte) _BBBBBBBB;
alias test!(ubyte, ubyte, ushort, float) _BBSf;
CODE

dmd -c bug

Internal error: backend/cod1.c 1664

----

This is most likely related to the recent ABI64 changes.

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