Revert "[InstCombine] Support gep nuw in icmp folds" (#118698)
[llvm-project.git] / openmp / runtime / test / ompt / misc / runtime_error.c
blobee9e2e832bfa98e1a8eceeb5c264c485b47dc49a
1 // RUN: %libomp-compile-and-run 2>&1 | sort | FileCheck %s
2 // REQUIRES: ompt
4 #include <string.h>
5 #include <stdio.h>
6 #include "callback.h"
8 // TODO: use error directive when compiler suppors
9 typedef void ident_t;
10 extern void __kmpc_error(ident_t *, int, const char *);
12 int main() {
13 #pragma omp parallel num_threads(2)
15 if (omp_get_thread_num() == 0) {
16 const char *msg = "User message goes here";
17 printf("0: Message length=%" PRIu64 "\n", (uint64_t)strlen(msg));
18 __kmpc_error(NULL, ompt_warning, msg);
21 return 0;
24 // CHECK: {{^}}0: Message length=[[LENGTH:[0-9]+]]
25 // CHECK: {{^}}0: NULL_POINTER=[[NULL:.*$]]
27 // CHECK: {{^}}[[PRIMARY_ID:[0-9]+]]: ompt_event_implicit_task_begin
28 // CHECK: {{^}}[[PRIMARY_ID]]: ompt_event_runtime_error
29 // CHECK-SAME: severity=1
30 // CHECK-SAME: message=User message goes here
31 // CHECK-SAME: length=[[LENGTH]]
32 // CHECK-SAME: codeptr_ra={{0x[0-f]+}}
34 // Message from runtime
35 // CHECK: {{^}}OMP: Warning{{.*}}User message goes here