aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/ia64-asm-1.c
blob: 48b24d31a7a4f25fa4b6fb2fc921348d911464d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/* { dg-do run { target ia64-*-* } } */
/* { dg-options } */

/* Test that "=S" properly avoids the post-increment on the memory address.  */

static void foo(int *x)
{
  long i;
  for (i = 0; i < 100; ++i)
    __asm__("st4 %0 = r0" : "=S"(x[i]));
}

int main()
{
  int array[100];
  long i;

  for (i = 0; i < 100; ++i)
    array[i] = -1;

  foo(array);

  for (i = 0; i < 100; ++i)
    if (array[i])
      abort ();
  return 0;
}