[llvm-bugs] [Bug 26035] New: [clang-cl] error: "invalid operand for instruction" on boost::atomic

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 5 12:29:19 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26035

            Bug ID: 26035
           Summary: [clang-cl] error: "invalid operand for instruction" on
                    boost::atomic
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: heavenandhell171 at gmail.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

This is based on the reduced test case from PR26001, which had a similar
problem.

$ cat > Tmp.cpp
template <bool Signed>
struct make_storage_type {
  typedef unsigned long long type;
};

template <bool Signed>
struct msvc_dcas_x86 {
  typedef typename make_storage_type<Signed>::type storage_type;
  void store() {
    storage_type v;
    __asm movq xmm4, v;
  }
};

int main() {
  msvc_dcas_x86<false> x;
  x.store();
}

$ clang-cl Tmp.cpp
Tmp.cpp(11,5) :  error: invalid operand for instruction
    __asm movq xmm4, v;
    ^
<inline asm>(2,2) :  note: instantiated into assembly here
        movq xmm4, dword ptr v
        ^
1 error generated.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160105/b730acc0/attachment.html>


More information about the llvm-bugs mailing list