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

via D.gnu d.gnu at puremagic.com
Sun Jul 9 15:03:42 PDT 2017


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

            Bug ID: 264
           Summary: [ICE] (update_equiv_regs) ira.c:3425: Assertion failed
                    gcc_assert (REG_P (dest));
           Product: GDC
           Version: development
          Hardware: ARM
                OS: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: gdc
          Assignee: ibuclaw at gdcproject.org
          Reporter: ibuclaw at gdcproject.org

Backtrace on aarch64-linux-gnu gdc cross compiler:
---
during RTL pass: ira
testv.d: In function 'test1':
testv.d:13:1: internal compiler error: in update_equiv_regs, at ira.c:3425
0xa91413 update_equiv_regs
        /buildbot/aarch64-linux-gnu/build/gcc/ira.c:3425
0xa96de0 ira
        /buildbot/aarch64-linux-gnu/build/gcc/ira.c:5226
0xa96de0 execute
        /buildbot/aarch64-linux-gnu/build/gcc/ira.c:5581
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://bugzilla.gdcproject.org> for instructions.
---

Few examples, all seem to ICE because of passing static arrays as a dynamic
array parameter, or more specifically, when the original array is in data
segment.

---
bool bt10715(uint[] ary)
{
    return !ary; // uses bt
}

void test10715()
{
    static uint[2] a1;
    if (bt10715(a1))
        assert(0);
}
---
struct Test9386
{
    static char[25] op;
    string sop()
    {
        return cast(string)op;
    }
}
---
void foo34(int[])
{
    static int[5] x;
    foo34(x);
}
---
void foo16(bool[])
{
}

void test16()
{
    static bool[16] b1;
    foo16(b1);
}
---
struct Data15664A
{
    int[][2] b;
}

Data15664A d15664a1 = {};

void test15664()
{
    assert(d15664a1.b == []);
}
---
int sum(...)
{
    int s;
    return s;
}

void test1()
{
    static int[3] a;
    sum(a);
}
---


Dump of one of the tests:
---
Original:

foo34 (struct  _param_0)
{
  foo34 ({.length=5, .ptr=(int *) &x});
}

Gimple:

foo34 (struct  _param_0)
{
  struct  D.2609;

  D.2609.length = 5;
  D.2609.ptr = &x;
  foo34 (D.2609);
}
---

This ICE only happens if compiling without optimizations.

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


More information about the D.gnu mailing list