[Openmp-commits] [PATCH] D133594: [Libomptarget] Fix compiling with asserts using the bitcode library

Joseph Huber via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Fri Sep 9 13:25:48 PDT 2022


This revision was automatically updated to reflect the committed changes.
Closed by commit rG86587f289158: [Libomptarget] Fix compiling with asserts using the bitcode library (authored by jhuber6).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D133594/new/

https://reviews.llvm.org/D133594

Files:
  openmp/libomptarget/DeviceRTL/src/exports
  openmp/libomptarget/test/api/assert.c


Index: openmp/libomptarget/test/api/assert.c
===================================================================
--- /dev/null
+++ openmp/libomptarget/test/api/assert.c
@@ -0,0 +1,14 @@
+// RUN: %libomptarget-compile-run-and-check-generic
+
+#include <assert.h>
+#include <stdio.h>
+
+int main() {
+  int i = 1;
+#pragma omp target
+  assert(i > 0);
+
+  // CHECK: PASS
+  printf("PASS\n");
+  return 0;
+}
Index: openmp/libomptarget/DeviceRTL/src/exports
===================================================================
--- openmp/libomptarget/DeviceRTL/src/exports
+++ openmp/libomptarget/DeviceRTL/src/exports
@@ -4,3 +4,4 @@
 
 memcmp
 printf
+__assert_fail


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133594.459186.patch
Type: text/x-patch
Size: 665 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20220909/d123d2ed/attachment.bin>


More information about the Openmp-commits mailing list