[Bug c/81629] redefined memcpy leads to segmentation fault

2017-07-31 Thread frederic.besson at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81629

--- Comment #1 from Frédéric Besson  ---
Created attachment 41869
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41869=edit
preprcessed source

[Bug c/81629] New: redefined memcpy leads to segmentation fault

2017-07-31 Thread frederic.besson at inria dot fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81629

Bug ID: 81629
   Summary: redefined memcpy leads to segmentation fault
   Product: gcc
   Version: 7.1.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
  Assignee: unassigned at gcc dot gnu.org
  Reporter: frederic.besson at inria dot fr
  Target Milestone: ---

Hi,

The simple code below crashes with  internal compiler error: Segmentation
fault.
It seems gcc does not like the redefinition of memcpy.


extern unsigned long long memcpy(unsigned long long, unsigned long long,
unsigned long long);

void foo(unsigned long long ctx, unsigned long long output)
{
  memcpy(ctx + 2LLU, ctx,  1U);
  return;
}


Best regards,