[Bug 264] [ICE] (update_equiv_regs) ira.c:3425: Assertion failed gcc_assert (REG_P (dest));

via D.gnu d.gnu at puremagic.com
Tue Jul 11 11:51:01 PDT 2017


https://bugzilla.gdcproject.org/show_bug.cgi?id=264

Iain Buclaw <ibuclaw at gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #1 from Iain Buclaw <ibuclaw at gdcproject.org> ---
Distilling the code down to C++.
---
struct DArray
{
    size_t length;
    int* ptr;
};

void foo35(DArray)
{
    static int x[5];
    foo35({5, (int*)&x});
}
---
And equivalent D (that ICE's on AArch).
---
struct DArray
{
    size_t length;
    int* ptr;
};

void foo35(DArray)
{
    static int x[5];
    foo35(DArray(5, cast(int*)&x));
}
---

On notable difference between the two is that where gdc generates the following
call:

foo35 ({.length=5, .ptr=(int *) &x});

In g++, the CONSTRUCTOR is wrapped into a TARGET_EXPR.  This is at least one
thing that could be done differently, applying that to all CONSTRUCTORs passed
via parameters.

I was thinking that we already do some sort of special case for CONSTRUCTORs,
but no, it's only empty aggregates.

https://github.com/D-Programming-GDC/GDC/blob/6c9b5ba4a88be37932fc810ecb88283048f2d2ea/gcc/d/d-codegen.cc#L1960

The proposed fix would be applied after here.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the D.gnu mailing list