This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Wrong RTL instruction deleted
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: dewar at adacore dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 27 Dec 04 09:34:15 EST
- Subject: 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;
}