<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - multiplying long long with fsanitize=integer fails with undefined reference to __mulodi4"
   href="http://llvm.org/bugs/show_bug.cgi?id=17693">17693</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>multiplying long long with fsanitize=integer fails with undefined reference to __mulodi4
          </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>Linux
          </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>ebacon@shaw.ca
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Multiplying two long long integers fails when using -fsanitze=integer:

$ cat tst.c 
#include <stdlib.h>
int main(int argc, char **argv)
{
    long long x = atoi(argv[1]);
    long long y = atoi(argv[2]);
    long long z = x * y;

    return 0;
}
$ clang --version
clang version 3.4 (trunk 193413)
Target: i386-pc-linux-gnu
Thread model: posix
$ clang -fsanitize=integer tst.c
/tmp/tst-f4b367.o: In function `main':
tst.c:(.text+0x82): undefined reference to `__mulodi4'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
$ clang tst.c
$

This works on x86_64, though, but not when using -m32:

x86-64 $ clang --version
clang version 3.4 (trunk 193417)
Target: x86_64-unknown-linux-gnu
Thread model: posix
x86-64 $ clang -fsanitize=integer -m32 tst.c
/tmp/tst-723c9c.o: In function `main':
tst.c:(.text+0x82): undefined reference to `__mulodi4'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
x86-64 $ clang -fsanitize=integer tst.c
x86-64 $ clang  -m32 tst.c
x86-64 $ 

Perhaps related to <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - undefined reference to '__mulodi4'"
   href="show_bug.cgi?id=14469">http://llvm.org/bugs/show_bug.cgi?id=14469</a> ?</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>