aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/c-c++-common/pr43690.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/c-c++-common/pr43690.c')
-rw-r--r--gcc-4.9/gcc/testsuite/c-c++-common/pr43690.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/c-c++-common/pr43690.c b/gcc-4.9/gcc/testsuite/c-c++-common/pr43690.c
new file mode 100644
index 000000000..67c6cb0f8
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/c-c++-common/pr43690.c
@@ -0,0 +1,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" } */
+ 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" } */
+}