8sa1-gcc/gcc/testsuite/gcc.dg/ia64-asm-1.c
Richard Henderson cc914f8cbf New tests.
From-SVN: r35959
2000-08-24 15:17:54 -07:00

28 lines
432 B
C

/* { 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;
}