This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Wrong RTL instruction deleted


    Presumably the Ada program would fail in the same way. 

No, it won't because it uses VIEW_CONVERT_EXPR, which exists just to
support this case.  We've talked about using it in C++ and/or C, but
haven't actually done that.

The .t08.gimple file for that example (with some junk deleted) is

Foo ()
{
  float D.710;
  foo__to_floatGP101__source D.711;
  foo__to_floatGP101__target D.712;
  float D.713;
  typedef foo__to_floatGP101__source foo__to_floatGP101__source;
  typedef foo__to_floatGP101__target foo__to_floatGP101__target;

  D.711 = 2147483648;
  D.712 = VIEW_CONVERT_EXPR<foo__to_floatGP101__target>(D.711);
  D.713 = (float) D.712;
  D.710 = D.713;
  return D.710;
}

and .t65.vars (again, with junk deleted) is

Foo ()
{
  foo__to_floatGP101__target D.712;

  D.712 = VIEW_CONVERT_EXPR<foo__to_floatGP101__target>(2147483648);
  return (float) D.712;

}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]