[Bug tree-optimization/85478] ICE with single element vector

krebbel at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Apr 20 10:56:00 GMT 2018


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

--- Comment #4 from Andreas Krebbel <krebbel at gcc dot gnu.org> ---
Indeed it does not appear to fail with a cross from x86. I've checked with
r259518 on s390x as well as on x86. With an x86 cross no tree dump is generated
after 012t.ompexp and the generated assembler file does not contain any code.

x86->s390x cross 012.ompexp:
...
;; Function c::f<ab<float>*, ab<long double>*> (_ZN1c1fIP2abIfEPS1_IeEEEiT_T0_,
funcdef_no=15, decl_uid
=2862, cgraph_uid=9, symbol_order=9)

c::f<ab<float>*, ab<long double>*> (struct ab * g, struct ab * h)
{
  struct ab * i;
  struct ab D.2925;

  <bb 2> :
  if (i == g)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  ab<long double>::ab (&D.2925, MEM[(const struct ab &)i]);
  *h = D.2925;
  h = h + 16;
  i = i + 16;
  goto <bb 2>; [INV]

  <bb 4> :
  __builtin_unreachable ();

}



;; Function ab<long double>::ab (_ZN2abIeEC2ES_IfE, funcdef_no=6,
decl_uid=2666, cgraph_uid=2, symbol_order=2)

ab<long double>::ab (struct ab * const this, struct ab g)
{
  complex double D.2939;

  <bb 2> :
  MEM[(struct  &)this] = {CLOBBER};
  D.2939 = ab<float>::m (&g);
  _1 = REALPART_EXPR <D.2939>;
  _2 = IMAGPART_EXPR <D.2939>;
  _3 = COMPLEX_EXPR <_1, _2>;
  this->n = _3;
  return;

}


s390x native 012.ompexp:

;; Function c::f<ab<float>*, ab<long double>*> (_ZN1c1fIP2abIfEPS1_IgEEEiT_T0_,
funcdef_no=15, decl_uid
=2896, cgraph_uid=9, symbol_order=9)

c::f<ab<float>*, ab<long double>*> (struct ab * g, struct ab * h)
{
  struct ab * i;
  struct ab D.2959;

  <bb 2> :
  if (i == g)
    goto <bb 4>; [INV]
  else
    goto <bb 3>; [INV]

  <bb 3> :
  ab<long double>::ab (&D.2959, MEM[(const struct ab &)i]);
  *h = D.2959;
  D.2959 = {CLOBBER};
  h = h + 32;
  i = i + 16;
  goto <bb 2>; [INV]

  <bb 4> :
  __builtin_unreachable ();

}



;; Function ab<long double>::ab (_ZN2abIgEC2ES_IfE, funcdef_no=6,
decl_uid=2700, cgraph_uid=2, symbol_order=2)

ab<long double>::ab (struct ab * const this, struct ab g)
{
  complex double D.2973;

  <bb 2> :
  MEM[(struct  &)this] = {CLOBBER};
  D.2973 = ab<float>::m (&g);
  _1 = REALPART_EXPR <D.2973>;
  _2 = (long double) _1;
  _3 = IMAGPART_EXPR <D.2973>;
  _4 = (long double) _3;
  _5 = COMPLEX_EXPR <_2, _4>;
  this->n = _5;
  return;

}


More information about the Gcc-bugs mailing list