view gcc/testsuite/c-c++-common/pr43690.c @ 158:494b0b89df80 default tip

...
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 18:13:55 +0900
parents 84e7813d76e9
children
line wrap: on
line source

/* 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" } */
}