gcc

Comment 14 for bug 885280

Revision history for this message
In , Pinskia (pinskia) wrote :

Not what is happening is an interaction between the inlining and the return slot optimization and the named value optimization.
Before inlining we have:

  # storage_1 = PHI <&<retval>.storage[0](2), &<retval>.storage[1](3)>
...
  copyBack.1_1 = (struct Region *) &copyBack;
  *copyBack.1_1 ={v} subtract (a_2(D)) [return slot optimization];

--- Cut ----
Since &(*copyBack.1_1).storage[0] is not a constant we get an ICE. Why we don't remove the extra cast to begin is questionable. If we change:
  const Region copyBack(subtract(a));
to
  const Region copyBack = (subtract(a));

We can remove the cast and it works.