1// Purpose:
2// Check that declaring duplicate addresses gives a useful error message.
3//
4// RUN: %dexter_regression_test_build %s -o %t
5// RUN: not %dexter_regression_test_run --binary %t -v -- %s | FileCheck %s --match-full-lines
6
7
8int main() {
9 int *result = new int(0);
10 delete result; // DexLabel('test_line')
11}
12
13// CHECK: parser error:{{.*}}err_duplicate_address.cpp([[# @LINE + 4]]): Found duplicate address: 'oops'
14// CHECK-NEXT: {{Dex}}DeclareAddress('oops', 'result', on_line=ref('test_line'))
15
16// DexDeclareAddress('oops', 'result', on_line=ref('test_line'))
17// DexDeclareAddress('oops', 'result', on_line=ref('test_line'))
18

source code of cross-project-tests/debuginfo-tests/dexter/feature_tests/subtools/test/err_duplicate_address.cpp