<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 --- - DEBUG output in InstructionCombining.cpp causing seg fault"
   href="https://llvm.org/bugs/show_bug.cgi?id=25983">25983</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>DEBUG output in InstructionCombining.cpp causing seg fault
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>Keywords</th>
          <td>compile-fail
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>paulsson@linux.vnet.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=15539" name="attach_15539" title="clang input">attachment 15539</a> <a href="attachment.cgi?id=15539&action=edit" title="clang input">[details]</a></span>
clang input

InstructionCombining is outputting a new instruction to dbgs(), without the new
instruction having been insterted into BB. The result is that an AssemblyWriter
is created with a null TheModule pointer.

A seg fault is caused by the supplied test case.

run:

clang -cc1 -triple s390x-ibm-linux-gnu -S -disable-free -main-file-name
ckd_alloc.c -mrelocation-model static -mthread-model posix -fmath-errno
-masm-verbose -mconstructor-aliases -fuse-init-array -target-cpu z13
-target-linker-version 2.25 -momit-leaf-frame-pointer -dwarf-column-info
-debugger-tuning=gdb -O3 -ferror-limit 19 -fmessage-length 0 -funroll-loops
-fobjc-runtime=gcc -fdiagnostics-show-option -vectorize-loops -vectorize-slp
-mllvm -debug -o ckd_alloc.s -x ir ckd_alloc.bc</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>