<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 --- - [intel inline asm] Crash when using 'short' keyword in intel assembly jumps instructions"
   href="http://llvm.org/bugs/show_bug.cgi?id=17751">17751</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[intel inline asm] Crash when using 'short' keyword in intel assembly jumps instructions
          </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 XP
          </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>william.ledoux@gmail.com
          </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>Created <span class=""><a href="attachment.cgi?id=11461" name="attach_11461" title="minimal not working example">attachment 11461</a> <a href="attachment.cgi?id=11461&action=edit" title="minimal not working example">[details]</a></span>
minimal not working example

Hello, 

void f(){
  __asm{
    jmp short l
  }
}

Compiling this minimal code will make clang crash with the following log.
The same thing occurs when replacing "short" by "long" (but not with any other
word, for instance "foo")

Thanks for your work.
William.

clang -c crash_asm.cpp -g -emit-llvm -o c:\temp\debug\test\crash_asm.bc
crash_asm.cpp:2:12: error: expected unqualified-id
        __asm jmp       short l;
                        ^
Stack dump:
0.      Program arguments: S:\LLVM\tests_compilation\llvm_34_r192445\clang.exe
-cc1 -triple i686-pc-win32 -emit-llvm-bc -disable-free -main-file-name
crash_asm.cpp -mrelocation-model static -mdisable-
fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4
-g -coverage-file c:\temp\debug\test\crash_asm.bc -resource-dir
S:\LLVM\tests_compilation\llvm_34_r192445\..\lib\clang\3.4
 -internal-isystem
S:\LLVM\tests_compilation\llvm_34_r192445\..\lib\clang\3.4\include
-internal-isystem C:\Progs32\Microsoft Visual Studio 11.0\VC\include
-internal-isystem C:\Progs32\Windows Kits\8.0
\\include -std=c++11 -fdeprecated-macro -fdebug-compilation-dir
S:\LLVM\tests_compilation\test\Code -ferror-limit 19 -fmessage-length 200
-mstackrealign -fms-extensions -fms-compatibility -fmsc-versio
n=1700 -fdelayed-template-parsing -fobjc-runtime=gcc -fcxx-exceptions
-fexceptions -fdiagnostics-show-option -fcolor-diagnostics -vectorize-slp -o
c:\temp\debug\test\crash_asm.bc -x c++ crash_asm.cpp

1.      crash_asm.cpp:2:18: current parser token 'l'
2.      crash_asm.cpp:1:9: parsing function body 'f'
3.      crash_asm.cpp:1:9: in compound statement ('{}')
0x018259DD (0x00577F00 0x0057A398 0x0057A7B4 0x01826F24)
0x017F583A (0x00000000 0x00000000 0x00000000 0x00000000)
clang.exe: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 3.4 (trunk)
Target: i686-pc-win32
Thread model: posix
clang.exe: note: diagnostic msg: PLEASE submit a bug report to
<a href="http://llvm.org/bugs/">http://llvm.org/bugs/</a> and include the crash backtrace, preprocessed source, and
associated run script.
clang.exe: note: diagnostic msg:
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang.exe: note: diagnostic msg: C:\temp\crash_asm-129b0c.cpp
clang.exe: note: diagnostic msg: C:\temp\crash_asm-129b0c.sh
clang.exe: note: diagnostic msg:

********************</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>