[llvm-branch-commits] [openmp] 723be40 - [OpenMP][OMPT][NFC] Fix failing test

Joachim Protze via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Nov 29 10:17:05 PST 2020


Author: Joachim Protze
Date: 2020-11-29T19:07:42+01:00
New Revision: 723be4042a3aa38523c60b1dd96b20448053c41e

URL: https://github.com/llvm/llvm-project/commit/723be4042a3aa38523c60b1dd96b20448053c41e
DIFF: https://github.com/llvm/llvm-project/commit/723be4042a3aa38523c60b1dd96b20448053c41e.diff

LOG: [OpenMP][OMPT][NFC] Fix failing test

The test would fail for gcc, when built with debug flag.

Added: 
    

Modified: 
    openmp/runtime/test/ompt/tasks/serialized.c

Removed: 
    


################################################################################
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);


        


More information about the llvm-branch-commits mailing list