From 280cb724b7499ed4f09f9a54e5ae457b1eb254ae Mon Sep 17 00:00:00 2001 From: qunyanm Date: Wed, 25 Nov 2015 11:50:43 -0800 Subject: Use the EndCurly token when creating the ReturnCmd for unifiedExit When there are more than one exit blocks, an unified exit block is created which includes a ReturnCmd. However, the ReturnCmd is created with NoToken. This causes the line/column number reported for a failed postcondition to be (0,0). The right token should be the EndCurly since the ReturnCmd is in the exit block. --- Test/test2/BadLineNumber.bpl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Test/test2/BadLineNumber.bpl (limited to 'Test/test2/BadLineNumber.bpl') diff --git a/Test/test2/BadLineNumber.bpl b/Test/test2/BadLineNumber.bpl new file mode 100644 index 00000000..b8776a4e --- /dev/null +++ b/Test/test2/BadLineNumber.bpl @@ -0,0 +1,15 @@ +// RUN: %boogie "%s" > "%t" +// RUN: %diff "%s.expect" "%t" + +procedure p(); + ensures false; + +implementation p() +{ + if (*) + { + } + else + { + } +} \ No newline at end of file -- cgit v1.2.3