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 c/65077] memcpy generates incorrect code with floating point numbers and -O1


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65077

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
   Last reconfirmed|                            |2015-02-16
                 CC|                            |rguenth at gcc dot gnu.org
         Resolution|INVALID                     |---
     Ever confirmed|0                           |1

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Ah, the issue is actually that we simply disregard passing pointers through
floating point values in points-to analysis:

          if (FLOAT_TYPE_P (TREE_TYPE (lhsop)))
            /* If the operation produces a floating point result then
               assume the value is not produced to transfer a pointer.  */
            ;

which results in

  # PT =
  s_13 = MEM[(char * {ref-all})&intSptr];

and DSE removing the store to

  # .MEM_15 = VDEF <.MEM_11>
  s_13->u.f1 = p_6;

we have similar handling for

          else if (truth_value_p (code))
            /* Truth value results are not pointer (parts).  Or at least
               very very unreasonable obfuscation of a part.  */
            ;

so if you insist on writing rediculous testcases...


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