<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 - clang-cl crash with constexpr ctor"
   href="https://bugs.llvm.org/show_bug.cgi?id=34858">34858</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-cl crash with constexpr ctor
          </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>C++14
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>powerchord@web.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>struct S
{
    constexpr S(int const & = 0) {}
};

S a[2]; // crash, see log below and attached files
S b[2] {}; // crash
// In contrast:
S c[2] {0}; // OK
S d[1]; // OK
S e[1] {}; // OK

----------------------------------------------------------

1>Assertion failed: Result.isUninit() && "temporary created multiple times",
file C:\src\llvm_package_314411\llvm\tools\clang\lib\AST\ExprConstant.cpp, line
1107
1>Wrote crash dump file "C:\Users\x\AppData\Local\Temp\CL.exe-308f23.dmp"
1>0x01E82CA8 (0x00000016 0x04A7D360 0x768A8350 0x00000003)
1>0x768453E2 (0x04A7E2AE 0x04A7D360 0x001803B8 0x058CCBBC), abort() + 0x32
bytes(s)
1>0x76846CE7 (0x00000453 0x0ADD3A00 0x058CD7A0 0x058CCBCC), _get_wpgmptr() +
0x1777 bytes(s)
1>0x7684614B (0x00000453 0x036AE040 0x001803A0 0x036AE040), _get_wpgmptr() +
0xBDB bytes(s)
1>0x76846DE6 (0x04A7E2AE 0x04A7D360 0x00000453 0x058CCC44), _wassert() + 0x16
bytes(s)
1>0x036AE040 (0x00000000 0x0ADD3B30 0x058CD7A0 0x0ADD3A00)
1>0x036A5F3C (0x774137EE 0x774E6E38 0x00000050 0x000A0000)
1>0x036A21BA (0x058CCDC4 0x767CE7EB 0x000A0000 0x00000000)
1>0x036A3B7D (0x058CD788 0x058CCEC0 0x00102800 0x268D563B)
1>0x03694C57 (0x058CD914 0x03634A6E 0x00129FF0 0x0ADD3B30)
1>0x02BF19E8 (0x00129FF0 0x0ADD3B30 0x0ADCBDD0 0x00000001)
1>0x03634A6E (0x058CD930 0x058CD93C 0x058CD9B0 0x00000000)
1>0x02BB0EE7 (0x00000000 0x268D563B 0x058CD97C 0x058CD9A8)
1>clang-cl.exe : error : clang frontend command failed due to signal (use -v to
see invocation)
1>clang version 6.0.0 (trunk)
1>Target: i686-pc-windows-msvc
1>Thread model: posix
1>InstalledDir: C:\Program Files (x86)\LLVM\msbuild-bin
1>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.
1>clang-cl.exe: note: diagnostic msg:
1>********************
1>
1>PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
1>Preprocessed source(s) and associated run script(s) are located at:
1>clang-cl.exe: note: diagnostic msg:
C:\Users\x\AppData\Local\Temp\State1-fca48a.cpp
1>clang-cl.exe: note: diagnostic msg:
C:\Users\x\AppData\Local\Temp\State1-fca48a.sh
1>clang-cl.exe: note: diagnostic msg:
1>
1>********************</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>