<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - VS 2017: error G15E2B2A9: cannot use more than one symbol in memory operand"
   href="https://bugs.llvm.org/show_bug.cgi?id=37136">37136</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>VS 2017: error G15E2B2A9: cannot use more than one symbol in memory operand
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvm@reupen.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20192" name="attach_20192" title="Generated stdafx.asm file">attachment 20192</a> <a href="attachment.cgi?id=20192&action=edit" title="Generated stdafx.asm file">[details]</a></span>
Generated stdafx.asm file

With Clang trunk, I have (recently) been getting the following errors when
building my project:


F:\foobar2000\columns_ui\vc15\Release\foo_ui_columns\stdafx.asm:67:14: error:
cannot use more than one symbol in memory operand
        push    offset
"??__Fdata@?$_service_by_guid_data_container@Vui_element@@@@2V?$service_by_guid_data@Vui_element@@@@A@YAXXZ"
                       ^
F:\foobar2000\columns_ui\vc15\Release\foo_ui_columns\stdafx.asm:101:14: error:
cannot use more than one symbol in memory operand
        push    offset
"?data@?$_service_by_guid_data_container@Vui_element@@@@2V?$service_by_guid_data@Vui_element@@@@A"+4
                       ^
F:\foobar2000\columns_ui\vc15\Release\foo_ui_columns\stdafx.asm:345:14: error:
cannot use more than one symbol in memory operand
        push    offset "??__Fwindow_ptr_null@uie@@YAXXZ"


The errors appear to be referring to certain static data members.



For the third error, here is some more context from the generated stdafx.asm
file (entire file attached):

        .def     __GLOBAL__sub_I_stdafx.cpp;
        .scl    3;
        .type   32;
        .endef
        .section        .text,"xr",one_only,__GLOBAL__sub_I_stdafx.cpp
        .p2align        4, 0x90         # -- Begin function
_GLOBAL__sub_I_stdafx.cpp
__GLOBAL__sub_I_stdafx.cpp:             # @_GLOBAL__sub_I_stdafx.cpp
Lfunc_begin4:
        .cv_func_id 38
        .cv_loc 38 7 0 0                # foo_ui_columns\stdafx.cpp:0:0
        .cv_fpo_proc    __GLOBAL__sub_I_stdafx.cpp 0
# %bb.0:
        push    ebp
        .cv_fpo_pushreg ebp
        mov     ebp, esp
        .cv_fpo_setframe        ebp
        .cv_fpo_endprologue
Ltmp40:
        .cv_inline_site_id 39 within 38 inlined_at 7 0 0
        .cv_loc 39 1 134 0              #
foo_ui_columns/../columns_ui-sdk/ui_extension.h:134:0
        push    offset "??__Fwindow_ptr_null@uie@@YAXXZ"
        call    _atexit
        add     esp, 4
        pop     ebp
        ret
Ltmp41:
        .cv_fpo_endproc
Lfunc_end4:


The respective static member is declared and defined here:
<a href="https://github.com/reupen/columns_ui-sdk/blob/677c84a79411a2b1e96d3141ba091cb35b52896e/ui_extension.h#L134">https://github.com/reupen/columns_ui-sdk/blob/677c84a79411a2b1e96d3141ba091cb35b52896e/ui_extension.h#L134</a>


Clang was built today, from the GitHub mirror:

F:\foobar2000\columns_ui>clang --version
clang version 7.0.0 (<a href="https://github.com/llvm-mirror/clang">https://github.com/llvm-mirror/clang</a>
ea7b75a952203b9a2baedad66ec3e3397bb74386)
(<a href="https://github.com/llvm-mirror/llvm.git">https://github.com/llvm-mirror/llvm.git</a>
5365e8b41893d044805a280c862c6a9a8732f3cc)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\LLVM\bin



I've been seeing this for at least a few months, but this does not happen under
Clang 6.0.0.


I don't have a minimal example of this, but the relevant project I'm seeing
this in is at <a href="https://github.com/reupen/columns_ui">https://github.com/reupen/columns_ui</a>

The relevant command that triggers the error (in a VS 2017 command prompt) is
(adjust paths as necessary):

"C:\Program Files\LLVM\msbuild-bin\CL.exe" /c
/I"F:\foobar2000\vcpkg\installed\x86-windows\include" /Zi /nologo /W3 /WX-
/diagnostics:caret /MP /O2 /Oy- /GL /D WIN32 /D NDEBUG /D _WINDOWS /D _USRDLL
/D _WIN32_WINNT=0x0600 /D _WINDLL /D _UNICODE /D UNICODE /Gm- /EHsc /MT /GS-
/arch:IA32 /fp:precise /permissive- /Zc:wchar_t /Zc:forScope /Zc:inline /GR-
/std:c++17 /Yc"stdafx.h"
/Fp"F:\foobar2000\columns_ui\vc15\Release\foo_ui_columns\foo_ui_columns.pch"
/FAcs /Fa"F:\foobar2000\columns_ui\vc15\Release\foo_ui_columns\\"
/Fo"F:\foobar2000\columns_ui\vc15\Release\foo_ui_columns\\"
/Fd"F:\foobar2000\columns_ui\vc15\Release\foo_ui_columns\vc141.pdb" /Gd /TP
/analyze- /FC /errorReport:queue /Zc:threadSafeInit- /source-charset:utf-8 -m32
-fmsc-version=1910 foo_ui_columns\stdafx.cpp

(If trying to build, please note the requirements specified in the GitHub
README i.e. VS 2017, Windows 10 SDK, MS GSL.)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>