<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 - Compile error when compiling seh0020.c of github microsoft compiler-tests"
   href="https://bugs.llvm.org/show_bug.cgi?id=50856">50856</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Compile error when compiling seh0020.c of github microsoft compiler-tests
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>LLVM Codegen
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>tao.pan@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
          </td>
        </tr></table>
      <p>
        <div>
        <pre>No problem if use cl.exe
D:\llvm\compiler-tests\seh>cl.exe seh0020.c
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30037 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

seh0020.c
Microsoft (R) Incremental Linker Version 14.29.30037.0
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:seh0020.exe
seh0020.obj

Compile error if use clang-cl.exe
$ /c/work/llvm/llvm-project-4/build/Release/bin/clang-cl.exe seh0020.c
-fuse-ld=lld
seh0020.c(20,5): error: assignment to cast is illegal, lvalue casts are not
supported
    (volatile LONG) Counter += 1;
    ^~~~~~~~~~~~~~~~~~~~~~~ ~~
seh0020.c(24,5): error: assignment to cast is illegal, lvalue casts are not
supported
    (volatile LONG) Counter += 1;
    ^~~~~~~~~~~~~~~~~~~~~~~ ~~
seh0020.c(28,48): warning: format specifies type 'int' but the argument has
type 'LONG' (aka 'long') [-Wformat]
    printf("TEST 20 FAILED. Counter = %d\n\r", Counter);
                                      ~~       ^~~~~~~
                                      %ld
1 warning and 2 errors generated.</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>