aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/guality/pr69244.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/guality/pr69244.c')
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr69244.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/guality/pr69244.c b/gcc/testsuite/gcc.dg/guality/pr69244.c
new file mode 100644
index 0000000..6fe14bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr69244.c
@@ -0,0 +1,30 @@
+/* PR debug/69244 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+union U { float f; int i; };
+float a, b;
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ asm volatile ("" : : "g" (&a), "g" (&b) : "memory");
+}
+
+int
+main ()
+{
+ float e = a;
+ foo ();
+ float d = e;
+ union U p;
+ p.f = d += 2;
+ int c = p.i - 4;
+ asm (NOP : : : "memory");
+ b = c;
+ return 0;
+}
+
+/* { dg-final { gdb-test 25 "c" "p.i-4" } } */