Skip to content

Commit

Permalink
[libomptarget][NFC] Fix compilation issue with GCC
Browse files Browse the repository at this point in the history
Removed redundant assignment from condition which causes gcc to emit the following error:

error: operation on ‘MoveData’ may be undefined [-Werror=sequence-point]
  • Loading branch information
grokos committed Aug 10, 2021
1 parent 1fdb3e3 commit df06ec3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openmp/libomptarget/src/omptarget.cpp
Expand Up @@ -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,
Expand Down

0 comments on commit df06ec3

Please sign in to comment.