view gcc/testsuite/c-c++-common/pr43690.c @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
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" } */
  asm ("" : : "m" (x--));	/* { dg-error "is not directly addressable" } */
  asm ("" : : "m" (--x));	/* { dg-error "is not directly addressable" } */
  asm ("" : : "m" (x + 1));	/* { dg-error "is not directly addressable" } */
}