<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 --- - Split of debug info in SROA triggers assertion in verifier" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__llvm.org_bugs_show-5Fbug.cgi-3Fid-3D23712&d=AwMBaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=pF93YEPyB-J_PERP4DUZOJDzFVX5ZQ57vQk33wu0vio&m=G-RvcAGZA1DE08Yt5VY7mnV7ZPGiphLo6wMhSbKEi60&s=Nm1lrpVA4cmv50Z5oFaHHvXMyQ_UFzuHIvj_40Rz4qs&e=">23712</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Split of debug info in SROA triggers assertion in verifier
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>DebugInfo
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>kai@redstar.de
          </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=14407" name="attach_14407" title="File which triggers the assertion">attachment 14407</a> <a href="attachment.cgi?id=14407&action=edit" title="File which triggers the assertion">[details]</a></span>
File which triggers the assertion

If the attached opover2.ll is run through opt with: opt -O1 opover2.ll >x then
the following messages from the verifier occur:

piece is larger than or outside of variable
  call void @llvm.dbg.value(metadata i8* %val_arg.fca.0.extract, i64 0,
metadata
 !11, metadata !19), !dbg !18
!11 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "val", arg: 0, scope:
!6,
 file: !4, line: 1, type: !12)
!19 = !DIExpression(DW_OP_bit_piece, 0, 64)
piece is larger than or outside of variable
  call void @llvm.dbg.value(metadata i1 (i8*)* %val_arg.fca.1.extract, i64 0,
me
tadata !11, metadata !20), !dbg !18
!11 = !DILocalVariable(tag: DW_TAG_arg_variable, name: "val", arg: 0, scope:
!6,
 file: !4, line: 1, type: !12)
!20 = !DIExpression(DW_OP_bit_piece, 64, 64)
LLVM ERROR: Broken module found, compilation aborted!

Compiling the .ll file without optimization does not trigger these assertions.
The offending instructions are generated in SROA.cpp, line 4207.

The original source of the .ll file is in D. The lazy variable val is compiled
to a closure.

void bar(lazy bool val)
{
    val();
}

void foo()
{
    bar(false);
}</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>