Regardless of the validity, you are seeing an assertion failure.<br><br><div>Please file a bug report at <a href="http://llvm.org/bugs">llvm.org/bugs</a> and attach the preprocessed output and include the command line used.<br>
</div><div><br></div><div>Thanks!</div><br><div>On Thu Feb 27 2014 at 7:24:35 AM, JB Feldman <<a href="mailto:jb.feldman@kyrus-tech.com">jb.feldman@kyrus-tech.com</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi guys,<div><br></div><div>I will file a bug report in a little bit (once I get a minimal test case) but I wanted to ask if anyone understands the problem I'm seeing.</div><div><br></div><div>Trying to include ntddk.h and compiling with clang-cl, I get the following message:</div>
<div><br></div><div><div>In file included from kbfiltr.c:19:</div><div>In file included from ./kbfiltr.h:28:</div><div>C:\WINDDK\3790.1830\inc\ddk\wxp\ntddk.h(7149,29) : error: unexpected type name</div><div> 'KPCR': expected expression</div>
<div> __asm { movzx eax, _PCR KPCR.Number }</div><div> ^</div><div>Assertion failed: End.getPointer() <= EndPtr && "frontend claimed part of a token?", file ..\..\..\..\..\lib\Target\X86\AsmParser\X86AsmParser.cpp, line 1481</div>
<div>clang-cl.exe: error: clang frontend command failed with exit code 3 (use -v to s</div><div>ee invocation)</div></div><div><br></div><div>The assertion failure obviously results in a crash.</div><div><br></div><div>So my initial guess was some kind of Lexer issue, maybe because of no semicolon, or... who knows. But then, I rewrote that code to read:</div>
<div><br></div><div>int x = FIELD_OFFSET(KPCR, Number);</div><div>__asm { movzx eax, fs:[x] } </div><div><br></div><div>Which compiles to the same code, and that actually did work with clang-cl. Can anyone tell me why one works and the other doesn't? (My guess: MS not following standard Intel notation spec)</div>
<div><br></div><div>Thanks,<br>JB</div></div>
______________________________<u></u>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/cfe-dev</a><br>
</blockquote>