[all-commits] [llvm/llvm-project] c964f3: [OPENMP]Use the real pointer value as base, not in...

Alexey Bataev via All-commits all-commits at lists.llvm.org
Fri Nov 20 11:36:37 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c964f308141578f24932c68a03af5fae7f876011
      https://github.com/llvm/llvm-project/commit/c964f308141578f24932c68a03af5fae7f876011
  Author: Alexey Bataev <a.bataev at hotmail.com>
  Date:   2020-11-20 (Fri, 20 Nov 2020)

  Changed paths:
    M clang/lib/CodeGen/CGOpenMPRuntime.cpp
    M clang/test/OpenMP/target_data_map_pointer_array_subscript_codegen.cpp

  Log Message:
  -----------
  [OPENMP]Use the real pointer value as base, not indexed value.

After fix for PR48174 the base pointer for pointer-based
array-sections/array-subscripts will be emitted as `&ptr[idx]`, but
actually it should be just `ptr`, i.e. the address stored in the ponter
to point correctly to the beginning of the array. Currently it may lead
to a crash in the runtime.

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




More information about the All-commits mailing list