<html>
    <head>
      <base href="https://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 --- - fatal error: error in backend: Starting a function before ending the previous one! (MinGW64/MSYS2)"
   href="https://llvm.org/bugs/show_bug.cgi?id=25529">25529</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>fatal error: error in backend: Starting a function before ending the previous one! (MinGW64/MSYS2)
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>other
          </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>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>m-w4@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I tried to compile YouCompleteMe on MSYS2/MinGW64 with Clang 3.7.0 using the
GCC 5.2.0 stdlib. Clang failed with an internal error, instructing me to report
the error. The same error occurs when using the mMinGW64 Boost library version
1.59.0 instead of the one provided by YouCompleteMe.

Building with verbose output yields
[  1%] Building CXX object
BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_month.cpp.obj
cd /V/home/mjw/.vim/bundle/YouCompleteMe/ycmd_build/BoostParts &&
/C/msys64/mingw64/bin/clang++.exe   -DBOOST_PYTHON_SOURCE
-DBOOST_THREAD_DONT_USE_CHRONO -DBOOST_THREAD_USE_LIB -DMS_WIN64
-DYCMD_CORE_VERSION=17 -v -include cmath -w -O3 -DNDEBUG -isystem
/V/home/mjw/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/BoostParts -isystem
/C/msys64/mingw64/include/python2.7    -std=c++0x -o
CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_month.cpp.obj -c
/V/home/mjw/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/BoostParts/libs/date_time/src/gregorian/greg_month.cpp
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-w64-windows-gnu
Thread model: posix
 "C:\\msys64\\mingw64\\bin\\clang++.exe" -cc1 -triple x86_64-w64-windows-gnu
-emit-obj -disable-free -disable-llvm-verifier -main-file-name greg_month.cpp
-mrelocation-model pic -pic-level 2 -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64
-momit-leaf-frame-pointer -v -dwarf-column-info -coverage-file
"V:\\home\\mjw\\.vim\\bundle\\YouCompleteMe\\ycmd_build\\BoostParts\\CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_month.cpp.obj"
-resource-dir "C:\\msys64\\mingw64\\bin\\..\\lib\\clang\\3.7.0" -include cmath
-isystem V:/home/mjw/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/BoostParts
-isystem C:/msys64/mingw64/include/python2.7 -D BOOST_PYTHON_SOURCE -D
BOOST_THREAD_DONT_USE_CHRONO -D BOOST_THREAD_USE_LIB -D MS_WIN64 -D
YCMD_CORE_VERSION=17 -D NDEBUG -internal-isystem
"C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++" -internal-isystem
"C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\x86_64-w64-mingw32"
-internal-isystem
"C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\backward"
-internal-isystem
"C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\5.2.0"
-internal-isystem
"C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\5.2.0\\x86_64-w64-mingw32"
-internal-isystem
"C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include\\c++\\5.2.0\\backward"
-internal-isystem "C:\\msys64\\mingw64\\include\\c++\\5.2.0" -internal-isystem
"C:\\msys64\\mingw64\\include\\c++\\5.2.0\\x86_64-w64-mingw32"
-internal-isystem "C:\\msys64\\mingw64\\include\\c++\\5.2.0\\backward"
-internal-isystem
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\5.2.0\\include\\c++"
-internal-isystem
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\5.2.0\\include\\c++\\x86_64-w64-mingw32"
-internal-isystem
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\5.2.0\\include\\c++\\backward"
-internal-isystem "C:\\msys64\\mingw64\\bin\\..\\lib\\clang\\3.7.0\\include"
-internal-isystem
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\5.2.0\\include"
-internal-isystem
"C:\\msys64\\mingw64\\x86_64-w64-mingw32/sys-root/mingw/include"
-internal-isystem
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\5.2.0\\include-fixed"
-internal-isystem "C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include"
-internal-isystem "C:\\msys64\\mingw64\\include" -O3 -w -std=c++0x
-fdeprecated-macro -fdebug-compilation-dir
"V:\\home\\mjw\\.vim\\bundle\\YouCompleteMe\\ycmd_build\\BoostParts"
-ferror-limit 19 -fmessage-length 0 -mstackrealign -fno-use-cxa-atexit
-fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option
-vectorize-loops -vectorize-slp -o
CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_month.cpp.obj -x
c++
V:/home/mjw/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/BoostParts/libs/date_time/src/gregorian/greg_month.cpp
clang -cc1 version 3.7.0 based upon LLVM 3.7.0 default target
x86_64-w64-windows-gnu
ignoring nonexistent directory
"C:\msys64\mingw64\x86_64-w64-mingw32\include\c++"
ignoring nonexistent directory
"C:\msys64\mingw64\x86_64-w64-mingw32\include\c++\x86_64-w64-mingw32"
ignoring nonexistent directory
"C:\msys64\mingw64\x86_64-w64-mingw32\include\c++\backward"
ignoring nonexistent directory
"C:\msys64\mingw64\x86_64-w64-mingw32\include\c++\5.2.0"
ignoring nonexistent directory
"C:\msys64\mingw64\x86_64-w64-mingw32\include\c++\5.2.0\x86_64-w64-mingw32"
ignoring nonexistent directory
"C:\msys64\mingw64\x86_64-w64-mingw32\include\c++\5.2.0\backward"
ignoring nonexistent directory
"C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\5.2.0\include\c++"
ignoring nonexistent directory
"C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\5.2.0\include\c++\x86_64-w64-mingw32"
ignoring nonexistent directory
"C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\5.2.0\include\c++\backward"
ignoring nonexistent directory
"C:\msys64\mingw64\x86_64-w64-mingw32/sys-root/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
 V:/home/mjw/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/BoostParts
 C:/msys64/mingw64/include/python2.7
 C:\msys64\mingw64\include\c++\5.2.0
 C:\msys64\mingw64\include\c++\5.2.0\x86_64-w64-mingw32
 C:\msys64\mingw64\include\c++\5.2.0\backward
 C:\msys64\mingw64\bin\..\lib\clang\3.7.0\include
 C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\5.2.0\include
 C:\msys64\mingw64\lib\gcc\x86_64-w64-mingw32\5.2.0\include-fixed
 C:\msys64\mingw64\x86_64-w64-mingw32\include
 C:\msys64\mingw64\include
End of search list.
fatal error: error in backend: Starting a function before ending the previous
one!
clang++.exe: error: clang frontend command failed with exit code 70 (use -v to
see invocation)
clang version 3.7.0 (tags/RELEASE_370/final)
Target: x86_64-w64-windows-gnu
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: V:\tmp\greg_month-d8d96f.cpp
clang++.exe: note: diagnostic msg: V:\tmp\greg_month-d8d96f.sh
clang++.exe: note: diagnostic msg:

********************
BoostParts/CMakeFiles/BoostParts.dir/build.make:206: die Regel für Ziel
„BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_month.cpp.obj“
scheiterte
make[2]: ***
[BoostParts/CMakeFiles/BoostParts.dir/libs/date_time/src/gregorian/greg_month.cpp.obj]
Fehler 70
make[2]: Verzeichnis „/home/mjw/.vim/bundle/YouCompleteMe/ycmd_build“ wird
verlassen
CMakeFiles/Makefile2:85: die Regel für Ziel
„BoostParts/CMakeFiles/BoostParts.dir/all“ scheiterte
make[1]: *** [BoostParts/CMakeFiles/BoostParts.dir/all] Fehler 2
make[1]: Verzeichnis „/home/mjw/.vim/bundle/YouCompleteMe/ycmd_build“ wird
verlassen
Makefile:83: die Regel für Ziel „all“ scheiterte
make: *** [all] Fehler 2</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>