[all-commits] [llvm/llvm-project] 73e8ca: [OPENMP]Fix PR46688: cast the type of the allocate...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Thu Jul 16 08:05:51 PDT 2020


  Branch: refs/heads/release/11.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 73e8ca7bbad561170a874de6246863a0b9fc24f9
      https://github.com/llvm/llvm-project/commit/73e8ca7bbad561170a874de6246863a0b9fc24f9
  Author: Alexey Bataev <a.bataev at hotmail.com>
  Date:   2020-07-16 (Thu, 16 Jul 2020)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp
    M clang/test/OpenMP/nvptx_allocate_codegen.cpp

  Log Message:
  -----------
  [OPENMP]Fix PR46688: cast the type of the allocated variable to the initial one.

Summary:
If the original variable is marked for allocation in the different
address space using #pragma omp allocate, need to cast the allocated
variable to its original type with the original address space.
Otherwise, the compiler may crash trying to bitcast the type of the new
allocated variable to the original type in some cases, like passing this
variable as an argument in function calls.

Reviewers: jdoerfert

Subscribers: jholewinski, cfe-commits, yaxunl, guansong, caomhin

Tags: #clang

Differential Revision: https://reviews.llvm.org/D83696

(cherry picked from commit 9dc327d1b74637dac6dc432fb66f88711af16a55)




More information about the All-commits mailing list