aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/validation/mem2reg/undef00.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-03-06 05:02:56 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-07-01 00:18:44 +0200
commitb8c17466f25794ff9bf444f058cadf637745a02d (patch)
tree7e12e80b149f0e1e5d4e1c0dbf2e8c51810cea24 /validation/mem2reg/undef00.c
parent11380d396ac94f6c808f130268c4ac026ac19f14 (diff)
downloadsparse-dev-b8c17466f25794ff9bf444f058cadf637745a02d.tar.gz
testsuite: improve mem2reg testcases
A few tests are added, some have been renamed to better refect their purposes. Finally, some checks have been added or tweaked. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'validation/mem2reg/undef00.c')
-rw-r--r--validation/mem2reg/undef00.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/validation/mem2reg/undef00.c b/validation/mem2reg/undef00.c
index ba9ba915..27f0aaa8 100644
--- a/validation/mem2reg/undef00.c
+++ b/validation/mem2reg/undef00.c
@@ -1,14 +1,22 @@
-void bad0(void)
+static int badr(void)
{
int *a;
- *a++;
+ return *a;
+}
+
+static void badw(int v)
+{
+ int *a;
+ *a = v;
}
/*
* check-name: undef00
- * check-command: test-linearize -Wno-decl -fdump-ir=mem2reg $file
+ * check-command: test-linearize -fdump-ir=mem2reg $file
* check-known-to-fail
* check-output-ignore
* check-output-pattern(1): load\\.
* check-output-pattern(1): load\\..*\\[UNDEF\\]
+ * check-output-pattern(1): store\\.
+ * check-output-pattern(1): store\\..*\\[UNDEF\\]
*/