<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 - [coroutines] segmentation fault running pass Module Verifier"
   href="https://bugs.llvm.org/show_bug.cgi?id=35048">35048</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[coroutines] segmentation fault running pass Module Verifier
          </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++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>lewissbaker@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>See godbolt code: <a href="https://godbolt.org/g/6JYFvu">https://godbolt.org/g/6JYFvu</a>

Instruction does not dominate all uses!
  <badref> = getelementptr inbounds, !dbg <0x7be4770>
  %9 = atomicrmw sub %"struct.task::promise_type"*
(%"struct.task::promise_type"*)* #0 0x0000000001e94b6a
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x1e94b6a)
#1 0x0000000001e92c5e
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x1e92c5e)
#2 0x0000000001e92dac
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x1e92dac)
#3 0x00007fa477e49390 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x11390)
#4 0x0000000001922ba2
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x1922ba2)
#5 0x0000000001922fb7
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x1922fb7)
#6 0x000000000192370e
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x192370e)
#7 0x000000000192966e
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x192966e)
#8 0x000000000192bd04
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x192bd04)
#9 0x0000000001a0bec9
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x1a0bec9)
#10 0x0000000001a19447
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x1a19447)
#11 0x0000000001a229da
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x1a229da)
#12 0x0000000001a22c1c
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x1a22c1c)
#13 0x0000000001a2332d
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x1a2332d)
#14 0x00000000019cefba
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x19cefba)
#15 0x00000000019cf0fe
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x19cf0fe)
#16 0x00000000019cf45c
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x19cf45c)
#17 0x0000000002824f01
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x2824f01)
#18 0x0000000002826675
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x2826675)
#19 0x00000000014e46a3
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x14e46a3)
#20 0x00000000019ceb74
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x19ceb74)
#21 0x000000000204c164
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x204c164)
#22 0x0000000002816b24
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x2816b24)
#23 0x00000000029affc8
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x29affc8)
#24 0x0000000002816107
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x2816107)
#25 0x00000000023dc4ae
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x23dc4ae)
#26 0x00000000023a98e6
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x23a98e6)
#27 0x000000000246e482
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x246e482)
#28 0x00000000009e8818
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x9e8818)
#29 0x000000000095523a
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x95523a)
#30 0x00007fa476dce830 __libc_start_main
(/lib/x86_64-linux-gnu/libc.so.6+0x20830)
#31 0x00000000009e6269
(/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0+0x9e6269)
Stack dump:
0.      Program arguments:
/opt/compiler-explorer/clang-trunk-20171023/bin/clang-6.0 -cc1 -triple
x86_64-unknown-linux-gnu -S -disable-free -disable-llvm-verifier
-discard-value-names -main-file-name example.cpp -mrelocation-model static
-mthread-model posix -fmath-errno -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info
-debug-info-kind=limited -dwarf-version=4 -debugger-tuning=gdb
-momit-leaf-frame-pointer -coverage-notes-file
/tmp/compiler-explorer-compiler117924-58-4capm4.omaapjh5mi/output.gcno
-resource-dir /opt/compiler-explorer/clang-trunk-20171023/lib/clang/6.0.0
-c-isystem /usr/include/x86_64-linux-gnu -cxx-isystem
/usr/include/x86_64-linux-gnu -internal-isystem
/opt/compiler-explorer/clang-trunk-20171023/bin/../include/c++/v1
-internal-isystem /usr/local/include -internal-isystem
/opt/compiler-explorer/clang-trunk-20171023/lib/clang/6.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-std=c++1z -fdeprecated-macro -fdebug-compilation-dir /compiler-explorer
-ferror-limit 19 -fmessage-length 0 -fcoroutines-ts -fobjc-runtime=gcc
-fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops
-vectorize-slp -mllvm --x86-asm-syntax=intel -o
/tmp/compiler-explorer-compiler117924-58-4capm4.omaapjh5mi/output.s -x c++
<source> 
1.      <eof> parser at end of file
2.      Per-module optimization passes
3.      Running pass 'CallGraph Pass Manager' on module '<source>'.
4.      Running pass 'Module Verifier' on function '@_Z1fv.resume'
clang-6.0: error: unable to execute command: Segmentation fault (core dumped)
clang-6.0: error: clang frontend command failed due to signal (use -v to see
invocation)
clang version 6.0.0 (trunk 316311)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/compiler-explorer/clang-trunk/bin
clang-6.0: 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-6.0: note: diagnostic msg: 
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-6.0: note: diagnostic msg: /tmp/example-788647.cpp
clang-6.0: note: diagnostic msg: /tmp/example-788647.sh
clang-6.0: note: diagnostic msg: 
********************
Compiler exited with result code 254</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>