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



--- Comment #16 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-04-24 
18:24:23 UTC ---

Reduced testcase (non-runtime, but one can see that %rdi which should be

clobbered by the memcpy call is used immediately after the memcpy call).

Probably wouldn't be too hard to turn this into an executable testcase, by

adding some noinline/noclone attributes, define bar, baz functions, and in main

initialize b.



const unsigned short *b, *c;

unsigned bar (void);

unsigned short *baz (unsigned long);



void __attribute__ ((ms_abi))

test (void)

{

  unsigned d;

  unsigned short *e;

  if ((d = bar ()))

    {

      e = baz (d * sizeof (unsigned short) + 20);

      __builtin_memcpy (e, b, d * sizeof (unsigned short));

      c = e;

    }

}



The ms_abi attribute seems to be essential for this, so perhaps something is

broken in the ms ABI support or when mixing the two ABIs?

Reply via email to