summaryrefslogtreecommitdiff
path: root/Test/inline/test5.bpl
diff options
context:
space:
mode:
authorGravatar mikebarnett <unknown>2009-07-15 21:03:41 +0000
committerGravatar mikebarnett <unknown>2009-07-15 21:03:41 +0000
commitce1c2de044c91624370411e23acab13b0381949b (patch)
tree592539996fe08050ead5ee210c973801611dde40 /Test/inline/test5.bpl
Initial set of files.
Diffstat (limited to 'Test/inline/test5.bpl')
-rw-r--r--Test/inline/test5.bpl20
1 files changed, 20 insertions, 0 deletions
diff --git a/Test/inline/test5.bpl b/Test/inline/test5.bpl
new file mode 100644
index 00000000..0132f60a
--- /dev/null
+++ b/Test/inline/test5.bpl
@@ -0,0 +1,20 @@
+// test a case, where the inlined proc comes before the caller
+
+procedure {:inline 2} foo()
+ modifies x;
+{
+ x := x + 1;
+}
+
+var x:int;
+
+procedure bar()
+ modifies x;
+{
+ x := 3;
+ call foo();
+ assert x == 4;
+ call foo();
+ assert x == 5;
+}
+