summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr70593.c
blob: c013683688b5c25a72e75115f64fd83654731135 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/* PR middle-end/70593 */
/* { dg-do run } */
/* { dg-options "-O2" } */

__attribute__((noinline, noclone)) unsigned long
foo (unsigned x)
{
  unsigned long a, c = x;
  asm volatile ("xorl\t%k1, %k1\n\tmovl\t$7, %k0" : "=c" (c), "=a" (a) : "0" (c), "1" (c) : "memory");
  return c;
}

int
main ()
{
  if (foo (3) != 7)
    __builtin_abort ();
  return 0;
}