[OMPT] Fix test cancel_parallel.c
authorJonas Hahnfeld <hahnjo@hahnjo.de>
Thu, 9 Nov 2017 14:26:14 +0000 (14:26 +0000)
committerJonas Hahnfeld <hahnjo@hahnjo.de>
Thu, 9 Nov 2017 14:26:14 +0000 (14:26 +0000)
commitc60300333e8ee1fee5d51aff7f25055b52e77b00
treebbaf582a9dfb702a01072703d616c13d3ccfe895
parent380346fce18233fcb550a9519aac70fa2a5cc438
[OMPT] Fix test cancel_parallel.c

If a parallel region is cancelled, execution resumes at the end
of the structured block. That is why this test cannot use the
"normal" macros that print right after inserting the label.
Instead it previously printed the addresses before the pragma
and swapped the checks compared to the other tests.

However, this does not work because FileChecks '*' is greedy
so that RETURN_ADDRESS always matched the second address. This
makes the test fail when an "overflow" occurrs and the first
address matches the value of codeptr_ra.

I discovered this on my MacBook but I'm unable to reproduce the
failure with the current version. Nevertheless we should fix this
problem to avoid that this test fails later after an unrelated change.

Differential Revision: https://reviews.llvm.org/D39708

llvm-svn: 317787
openmp/runtime/test/ompt/cancel/cancel_parallel.c