On Fri, 16 Jul 2010, Joern Rennecke wrote: > Quoting "Naveen H. S" <navee...@kpitcummins.com>: > > > extendsfdf2 - gcc.c-torture/execute/conversion.c > > gcc.dg/torture/fp-int-convert-float.c, gcc.dg/pr28796-2.c > > Note that some tests invoke undefined behaviour; I've also come across this > when doing optimized soft FP for ARCompact: > > http://gcc.gnu.org/viewcvs/branches/arc-4_4-20090909-branch/gcc/testsuite/gcc.dg/torture/fp-int-convert.h?r1=151539&r2=151545
That diff does not appear to relate to undefined behavior. GCC considers these out-of-range conversions to yield an unspecified value, possibly raising an exception, as per Annex F, and does not take the liberty of optimizing on the basis of them being undefined when not in an IEEE mode. -- Joseph S. Myers jos...@codesourcery.com