This is the mail archive of the gcc-bugs@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]

[Bug target/30961] [4.2/4.3 regression] redundant reg/mem stores/moves



------- Comment #10 from hjl at lucon dot org  2007-05-12 19:03 -------
Gcc 4.3 gives the same output for

float convert1( unsigned in )
{
        float f;
        __builtin_memcpy( &f, &in, sizeof( in ) );
        return f;
}

float convert2( unsigned in )
{
  union
    {
      float f;
      unsigned i;
    } x;
  x.i = in;
  return x.f;
}

while gcc 3.4 can optimize the first one. At least, gcc 4.3 is consistent.


-- 


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


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