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

--- Comment #6 from qinzhao at gcc dot gnu.org ---
just wondering why the ICE after my fix to PR102281. and found the reason:

Before the fix to PR102281, the IR before expansion phase is:

void test ()
{
  <<< Unknown tree: offset_type >>> PtrMem;

  <bb 2> :
  PtrMem = .DEFERRED_INIT (8, 1, 0);
  GIMPLE_NOP
  PtrMem ={v} {CLOBBER};
  return;

}

After the fix to PR102281, the IR before expansion phase is:
void test ()
{
  <<< Unknown tree: offset_type >>> PtrMem;

  <bb 2> :
  PtrMem_1 = .DEFERRED_INIT (8, 1, 0);
  return;

}

the key difference is, 

Before the PR102281 Fix, the LHS of the call to .DEFERRED_INIT is a
VAR_DECL(due to the additional call to __builtin_clear_padding (&PtrMem, ...),
and folded to GIMPLE_NOP later).  as a result, the RTL expansion for this call
went through the MEMSET expansion and succeed.

After the PR102281 Fix, the LHS of the call is a SSA name. as a result, the RTL
expansion for this call went thought the ASSIGN expansion and exposed the
issues for OFFSET_TYPE.

Reply via email to