summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/guality/pr41616-1.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/guality/pr41616-1.c')
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr41616-1.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/guality/pr41616-1.c b/gcc/testsuite/gcc.dg/guality/pr41616-1.c
new file mode 100644
index 00000000000..24f64ab083d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr41616-1.c
@@ -0,0 +1,20 @@
+/* { dg-do run { xfail *-*-* } } */
+/* { dg-options "-g" } */
+
+#include "guality.h"
+
+inline int f(int *a)
+{
+ return *a;
+}
+
+int
+main(int argc, char *argv[])
+{
+ int b = -1;
+ GUALCHKVAL (b);
+ if (argc > 0)
+ b = -f(&b);
+ GUALCHKVAL (b);
+ return b;
+}