TVM-Compiler icon indicating copy to clipboard operation
TVM-Compiler copied to clipboard

Clang failure on tuple assignment

Open mskvortsov opened this issue 5 years ago • 0 comments

struct __attribute__((tvm_tuple)) St {
  int value;
  __tvm_slice slice;
};

void foo(__tvm_slice slice, struct St *st)
{
  *st = __builtin_tvm_ldu(slice, 64);
}
test.cc:8:7: error: no viable overloaded '='
  *st = __builtin_tvm_ldu(slice, 64);
  ~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
test.cc:1:35: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from '__tvm_literal_struct_WiTs'
      (aka '__tvm_literal_struct_WiTs_Tag') to 'const St' for 1st argument
struct __attribute__((tvm_tuple)) St {
                                  ^
test.cc:1:35: note: candidate function (the implicit move assignment operator) not viable: no known conversion from '__tvm_literal_struct_WiTs'
      (aka '__tvm_literal_struct_WiTs_Tag') to 'St' for 1st argument
struct __attribute__((tvm_tuple)) St {
                                  ^
1 error generated.

mskvortsov avatar Dec 02 '19 20:12 mskvortsov