From 723be4042a3aa38523c60b1dd96b20448053c41e Mon Sep 17 00:00:00 2001 From: Joachim Protze Date: Sun, 29 Nov 2020 19:05:25 +0100 Subject: [PATCH] [OpenMP][OMPT][NFC] Fix failing test The test would fail for gcc, when built with debug flag. --- openmp/runtime/test/ompt/tasks/serialized.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openmp/runtime/test/ompt/tasks/serialized.c b/openmp/runtime/test/ompt/tasks/serialized.c index a2c102ac53c2..1ce0b17a395c 100644 --- a/openmp/runtime/test/ompt/tasks/serialized.c +++ b/openmp/runtime/test/ompt/tasks/serialized.c @@ -22,12 +22,15 @@ int main() { int t = (int)sin(0.1); #pragma omp task if (t) { - void *task_frame = get_frame_address(0); - if (creator_frame == task_frame) { - // Assume this code was inlined which the compiler is allowed to do. + if (creator_frame == get_frame_address(0)) { + printf("Assume this code was inlined which the compiler is allowed to do:\n"); print_frame(0); + } else if (creator_frame == get_frame_address(1)) { + printf("Assume this code was called from the application:\n"); + print_frame(1); } else { // The exit frame must be our parent! + printf("Assume this code was not inlined, exit frame must be our parent:\n"); print_frame_from_outlined_fn(1); } print_ids(0);