<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 - Linker error on Windows with -fsanitize=undefined and using <chrono> - unresolved symbol "___mulodi4""
   href="https://bugs.llvm.org/show_bug.cgi?id=46669">46669</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Linker error on Windows with -fsanitize=undefined and using <chrono> - unresolved symbol "___mulodi4"
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>10.0
          </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>familiebaumanns@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=23715" name="attach_23715" title="Source file">attachment 23715</a> <a href="attachment.cgi?id=23715&action=edit" title="Source file">[details]</a></span>
Source file

Expected Behaviour:
====================
No linker error


Actual Behaviour:
====================
unresolved symbol: ___mulodi4


Environment:
====================
OS: Windows 10 2004
Clang++ Version: 10.0.0, Target: i686-pc-windows-msvc


Compiler Output:
====================
LinkError.cpp:10:5: warning: ignoring return value of function declared with
'nodiscard' attribute [-Wunused-result]
    Clock::now();
    ^~~~~~~~~~
1 warning generated.
   Bibliothek "a.lib" und Objekt "a.exp" werden erstellt.
LinkError-0dde10.o : error LNK2019: Verweis auf nicht aufgelöstes externes
Symbol "___mulodi4" in Funktion ""public: static class
std::chrono::time_point<struct std::chrono::steady_clock,class
std::chrono::duration<__int64,struct std::ratio<1,1000000000> > > __cdecl
std::chrono::steady_clock::now(void)"
(?now@steady_clock@chrono@std@@SA?AV?$time_point@Usteady_clock@chrono@std@@V?$duration@_JU?$ratio@$00$0DLJKMKAA@@std@@@23@@23@XZ)".
a.exe : fatal error LNK1120: 1 nicht aufgelöste Externe
clang++: error: linker command failed with exit code 1120 (use -v to see
invocation)


Source-Code:
====================
#include <chrono>
#include <iostream>
#include <cstdint>


int main()
{
    using Clock = std::chrono::high_resolution_clock;

    Clock::now();
    return 0;
}


Additional:
====================
This error occurs only on Windows - on Linux it works.</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>