[Openmp-commits] [PATCH] D95903: [OpenMP][NFC] Pre-commit test changes regarding PR48933

Johannes Doerfert via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue Feb 2 15:26:57 PST 2021


jdoerfert created this revision.
jdoerfert added reviewers: JonChesterfield, grokos, ABataev, Fznamznon.
Herald added subscribers: guansong, yaxunl.
Herald added a reviewer: bollu.
jdoerfert requested review of this revision.
Herald added subscribers: cfe-commits, sstefan1.
Herald added a project: clang.

This will highlight the effective changes in subsequent commits.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D95903

Files:
  clang/test/OpenMP/nvptx_unsupported_type_messages.cpp


Index: clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
===================================================================
--- clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
+++ clang/test/OpenMP/nvptx_unsupported_type_messages.cpp
@@ -77,8 +77,54 @@
 void baz1() {
   T1 t = bar1();
 }
+
+long double ld_return1a() { return 0; }
+void ld_arg1a(long double ld) {}
+
+typedef long double ld_ty;
+ld_ty ld_return1b() { return 0; }
+void ld_arg1b(ld_ty ld) {}
+
+static long double ld_return1c() { return 0; }
+static void ld_arg1c(long double ld) {}
+
+inline long double ld_return1d() { return 0; }
+inline void ld_arg1d(long double ld) {}
+
+#ifndef _ARCH_PPC
+__float128 ld_return2a() { return 0; }
+void ld_arg2a(__float128 ld) {}
+
+typedef __float128 fp128_ty;
+fp128_ty ld_return2b() { return 0; }
+void ld_arg2b(fp128_ty ld) {}
+#endif
+
 #pragma omp end declare target
 
+// expected-note at +1 3{{'f' defined here}}
+inline long double dead_inline(long double f) {
+#pragma omp target map(f)
+  // expected-error at +1 3{{'f' requires 128 bit size 'long double' type support, but device 'nvptx64-unknown-unknown' does not support it}}
+  f = 1;
+  return f;
+}
+
+// expected-note at +1 3{{'f' defined here}}
+static long double dead_static(long double f) {
+#pragma omp target map(f)
+  // expected-error at +1 3{{'f' requires 128 bit size 'long double' type support, but device 'nvptx64-unknown-unknown' does not support it}}
+  f = 1;
+  return f;
+}
+
+template<typename T>
+long double dead_template(long double f) {
+#pragma omp target map(f)
+  f = 1;
+  return f;
+}
+
 #ifndef _ARCH_PPC
 // expected-note at +1 3{{'f' defined here}}
 __float128 foo1(__float128 f) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95903.320930.patch
Type: text/x-patch
Size: 1681 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20210202/3fda4ded/attachment.bin>


More information about the Openmp-commits mailing list