[Openmp-commits] [openmp] df06ec3 - [libomptarget][NFC] Fix compilation issue with GCC
George Rokos via Openmp-commits
openmp-commits at lists.llvm.org
Tue Aug 10 09:49:38 PDT 2021
Author: George Rokos
Date: 2021-08-10T09:43:43-07:00
New Revision: df06ec3057537a924aa5ad2d6f27a33da99817cd
URL: https://github.com/llvm/llvm-project/commit/df06ec3057537a924aa5ad2d6f27a33da99817cd
DIFF: https://github.com/llvm/llvm-project/commit/df06ec3057537a924aa5ad2d6f27a33da99817cd.diff
LOG: [libomptarget][NFC] Fix compilation issue with GCC
Removed redundant assignment from condition which causes gcc to emit the following error:
error: operation on ‘MoveData’ may be undefined [-Werror=sequence-point]
Added:
Modified:
openmp/libomptarget/src/omptarget.cpp
Removed:
################################################################################
diff --git a/openmp/libomptarget/src/omptarget.cpp b/openmp/libomptarget/src/omptarget.cpp
index 87ea1c49fe957..2bf64c91d88cd 100644
--- a/openmp/libomptarget/src/omptarget.cpp
+++ b/openmp/libomptarget/src/omptarget.cpp
@@ -518,7 +518,7 @@ int targetDataBegin(ident_t *loc, DeviceTy &Device, int32_t arg_num,
const bool HasFlagAlways = arg_types[i] & OMP_TGT_MAPTYPE_ALWAYS;
if (HasFlagTo && (!UseUSM || HasCloseModifier))
MoveData = HasFlagAlways ? MoveDataStateTy::REQUIRED
- : MoveData = MoveDataStateTy::UNKNOWN;
+ : MoveDataStateTy::UNKNOWN;
auto TPR = Device.getTargetPointer(
HstPtrBegin, HstPtrBase, data_size, HstPtrName, MoveData, IsImplicit,
More information about the Openmp-commits
mailing list