aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/pr43690.c
blob: 8d10744903f28ed4d9916d201fca1778755d5f93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
/* PR middle-end/43690 */
/* { dg-do compile } */
/* { dg-options "-O2" } */

void
foo (char *x)
{
  asm ("" : : "m" (x++));	/* { dg-error "is not directly addressable" } */
  asm ("" : : "m" (++x));	/* { dg-error "is not directly addressable" "" { target c } } */
  asm ("" : : "m" (x--));	/* { dg-error "is not directly addressable" } */
  asm ("" : : "m" (--x));	/* { dg-error "is not directly addressable" "" { target c } } */
  asm ("" : : "m" (x + 1));	/* { dg-error "is not directly addressable" } */
}