<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 --- - Clang Frontend Crash "Function return type does not match operand type of return inst!""
   href="http://llvm.org/bugs/show_bug.cgi?id=20719">20719</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang Frontend Crash "Function return type does not match operand type of return inst!"
          </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>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>nicholas11braden@yahoo.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=12924" name="attach_12924" title="order-d4495c.cpp and order-d4495c.sh">attachment 12924</a> <a href="attachment.cgi?id=12924&action=edit" title="order-d4495c.cpp and order-d4495c.sh">[details]</a></span>
order-d4495c.cpp and order-d4495c.sh

I'm using the LLVM/Clang Windows snapshots with Visual Studio 2013 via CMake to
compile a C++1z project.

Error message:

6>  Function return type does not match operand type of return inst!
6>    ret %"struct.std::_Callable_obj.531"* %this1, !dbg !3700
6>   %"struct.std::_Callable_obj.522"*fatal error: error in backend: Broken
function found, compilation aborted!
6>  Stack dump:
6>  0.    Program arguments: C:\Program Files (x86)\LLVM\msbuild-bin\CL.exe
-cc1 -triple i386-pc-windows-msvc -emit-obj -mrelax-all -disable-free
-main-file-name order.cpp -mrelocation-model static -mdisable-fp-elim
-relaxed-aliasing -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu
pentium4 -D_DEBUG -D_MT -D_DLL --dependent-lib=msvcrtd --dependent-lib=oldnames
-fdiagnostics-format msvc -gline-tables-only -dwarf-column-info -coverage-file
C:\Users\Nicholas\Desktop\GitHub\resplunk\build\test\resplunk\event\Events\_test_resplunk_event_Events_order.dir\Debug\order.obj
-resource-dir C:\Program Files (x86)\LLVM\msbuild-bin\..\lib\clang\3.6.0 -D
_HAS_EXCEPTIONS=0 -D _DEBUG -D CMAKE_INTDIR="Debug" -D _MBCS -I
C:\Users\Nicholas\Desktop\GitHub\resplunk\include -internal-isystem C:\Program
Files (x86)\LLVM\msbuild-bin\..\lib\clang\3.6.0\include -internal-isystem
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include
-internal-isystem C:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\atlmfc\include -internal-isystem C:\Program Files (x86)\Windows
Kits\8.1\Include\um -internal-isystem C:\Program Files (x86)\Windows
Kits\8.1\Include\shared -internal-isystem C:\Program Files (x86)\Windows
Kits\8.1\Include\winrt -O0 -Wall -Wno-error -std=c++11 -fdeprecated-macro
-fdebug-compilation-dir
C:\Users\Nicholas\Desktop\GitHub\resplunk\build\test\resplunk\event\Events
-ferror-limit 19 -fmessage-length 0 -mstackrealign -fms-extensions
-fms-compatibility -fms-compatibility-version=18.0 -fdelayed-template-parsing
-fno-inline -fobjc-runtime=gcc -fdiagnostics-show-option -std=c++1z -o
_test_resplunk_event_Events_order.dir\Debug\order.obj -x c++
..\..\..\..\..\test\resplunk\event\Events\order.cpp 
6>  1.    <eof> parser at end of file
6>  2.    Per-function optimization
6>  3.    Running pass 'Module Verifier' on function
'@"\01??$?0V<lambda_1>@@@?$_Callable_obj@V<lambda_1>@@$0A@@std@@QAE@$$QAV<lambda_1>@@@Z"'
6>clang-cl.exe : error : clang frontend command failed with exit code 70 (use
-v to see invocation)
6>  clang version 3.6.0 (214131)
6>  Target: i386-pc-windows-msvc
6>  Thread model: posix
6>  clang-cl.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.
6>  clang-cl.exe: note: diagnostic msg: 
6>  ********************
6>  
6>  PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
6>  Preprocessed source(s) and associated run script(s) are located at:
6>  clang-cl.exe: note: diagnostic msg:
C:\Users\Nicholas\AppData\Local\Temp\order-d4495c.cpp
6>  clang-cl.exe: note: diagnostic msg:
C:\Users\Nicholas\AppData\Local\Temp\order-d4495c.sh
6>  clang-cl.exe: note: diagnostic msg: 
6>  
6>  ********************

I have attached the specified files in a zip.</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>