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

Matthias Kretz (Vir) <kretz at kde dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kretz at kde dot org

--- Comment #5 from Matthias Kretz (Vir) <kretz at kde dot org> ---
Simpler variant. I couldn't come up with a better barrier to force the last
line to load from out than inline asm.

char in[2] = {2, 2};
short out[2] = {};

int
main()
{
  for (int i = 0; i < 2; ++i)
    out[i] = in[i];
  asm("":::"memory");
  if (out[0] != 2) __builtin_abort();
}

Reply via email to