[Bug tree-optimization/116034] wrong code with memcpy() from _Complex unsigned short at -fno-strict-aliasing -O1 and above

pinskia at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Jul 22 18:29:52 GMT 2024


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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Folding statement: _1 = &c + 1;
Queued stmt for removal.  Folds to: &MEM <__complex__ short unsigned int>
[(void *)&c + 1B]
Folding statement: _3 = MEM <unsigned short> [(char * {ref-all})_1];
Folded into: _3 = MEM <unsigned short> [(char * {ref-all})&c + 1B];

That is ok, but then we change it into:
  _3 = IMAGPART_EXPR <c_6(D)>;


More information about the Gcc-bugs mailing list