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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #1)
> Here is the testcase (and removed use of the headers):
> typedef unsigned long long uint64_t;
> 
> uint64_t uint5korr(const unsigned char *p)
> {
>   uint64_t result = 0;
>   __builtin_memcpy(&result, p, 5);
>   return result;
> }
> ---- CUT ---

The memcpy could be changed into a BIT_INSERT which will then be optimized
correctly.

Reply via email to