diff gcc/testsuite/gcc.dg/pr65980.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/gcc.dg/pr65980.c	Fri Oct 27 22:46:09 2017 +0900
@@ -0,0 +1,31 @@
+/* PR rtl-optimization/65980 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } } */
+
+typedef struct { int b; } A;
+void (*a) (int);
+int b;
+
+int
+foo (A *v)
+{
+  asm goto ("" : : "m" (v->b) : : l);
+  return 0;
+l:
+  return 1;
+}
+
+int
+bar (void)
+{
+  if (b)
+    {
+      if (foo (0) && a)
+	a (0);
+      return 0;
+    }
+  if (foo (0) && a)
+    a (0);
+  return 0;
+}