Thread overview
[Bug 264] [ICE] (update_equiv_regs) ira.c:3425: Assertion failed gcc_assert (REG_P (dest));
July 11
https://bugzilla.gdcproject.org/show_bug.cgi?id=264

Iain Buclaw <ibuclaw@gdcproject.org> changed:

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

--- Comment #1 from Iain Buclaw <ibuclaw@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.
July 12
https://bugzilla.gdcproject.org/show_bug.cgi?id=264

--- Comment #2 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Whoops, I totally forgot about marking the static '__thread' in C++.

I can now reproduce the ICE in g++. Yay!  Also, :-(

-- 
You are receiving this mail because:
You are watching all bug changes.
July 12
https://bugzilla.gdcproject.org/show_bug.cgi?id=264

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=81422

--- Comment #3 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Upstream bug raised.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81422

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