http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39246

meadori at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |meadori at gcc dot gnu.org

--- Comment #10 from meadori at gcc dot gnu.org ---
I just bumped into this again while looking through some XFAILS.
I think Andreas' analysis is correct, but I am not sure how to
fix the problem.

Note that for ARM that the test passes for '-mfloat-abi=hard'.

For `arm-none-eabi-gcc -O -Wuninitialized` we get:

original
========

{
  C f;

    C f;
  IMAGPART_EXPR <f> = 0.0;
  return f;
}

gimple
======

foo ()
{
  float D.4063;
  C f;

  ; NOTE: The partial store was promoted to a total store which
  ; introduces the 'REALPART_EXPR <f>' bit.
  D.4063 = REALPART_EXPR <f>;
  f = COMPLEX_EXPR <D.4063, 0.0>;
  <retval> = f;
  return <retval>;
}

cplxlower1
==========

foo ()
{
  float f$real;
  C f;

  <bb 2>:
  f$real_2 = f$real_6(D);
  f_3 = COMPLEX_EXPR <f$real_2, 0.0>;
  REALPART_EXPR <<retval>> = f$real_2;
  IMAGPART_EXPR <<retval>> = 0.0;
  return <retval>;

}

dce2
====

foo ()
{
  float f$real;
  C f;

  <bb 2>:
  ; NOTE: Warning about unused variable on next statement, which is
  ; associated with the 'C f;' declaration because the statements
  ; below as introduced by cplxlower1 don't have any location info.
  REALPART_EXPR <<retval>> = f$real_6(D);
  IMAGPART_EXPR <<retval>> = 0.0;
  return <retval>;

}

For `arm-none-eabi-gcc -O -Wuninitialized -mfloat-abi=hard` things are very
similar until we get to complex lowering:

gimple
======

foo ()
{
  float D.4062;
  C D.4063;
  C f;

  ; NOTE: The partial store was promoted to a total store which
  ; introduces the 'REALPART_EXPR <f>' bit.
  D.4062 = REALPART_EXPR <f>;
  f = COMPLEX_EXPR <D.4062, 0.0>;
  D.4063 = f;
  return D.4063;
}

cplxlower1
==========

foo ()
{
  float f$real;
  C f;

  <bb 2>:
  f$real_2 = f$real_5(D);
  f_3 = COMPLEX_EXPR <f$real_2, 0.0>;
  return f_3;

}

dce2
====

foo ()
{
  float f$real;
  C f;

  <bb 2>:
  ; NOTE: Warning about unused variable on next statement,
  ; which is associated with the '__imag__ f = 0;' line.
  f_3 = COMPLEX_EXPR <f$real_5(D), 0.0>;
  return f_3;

}

Reply via email to