<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 - Assertion on building OpenAL library glue"
   href="https://bugs.llvm.org/show_bug.cgi?id=39591">39591</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Assertion on building OpenAL library glue
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>lld
          </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>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

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

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

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, peter.smith@linaro.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Running

./emcc system/lib/al.c 

(input file is here:
<a href="https://github.com/kripken/emscripten/blob/incoming/system/lib/al.c">https://github.com/kripken/emscripten/blob/incoming/system/lib/al.c</a> )

leads to an assertion failure in wasm-ld

wasm-ld:
/b/build/slave/linux/build/src/src/work/llvm/include/llvm/Support/Casting.h:255:
typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = llvm::FunctionType,
Y = llvm::Type]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible
type!"' failed.
Stack dump:
0.      Program arguments: /home/azakai/Dev/sdk/upstream/37040/bin/wasm-ld
--export-dynamic -z stack-size=5242880 --global-base=1024
--initial-memory=16777216 -o /tmp/tmpcXLCZS/a.out.wasm --no-entry
--allow-undefined --import-memory --export __wasm_call_ctors --export
__data_end --lto-O0 /tmp/tmpcXLCZS/al_0.o
/home/azakai/.emscripten_cache/wasm_bc/libc.bc
/home/azakai/.emscripten_cache/wasm_bc/wasm-libc.bc
/home/azakai/.emscripten_cache/wasm_bc/dlmalloc.bc
/home/azakai/.emscripten_cache/wasm_bc/compiler-rt.a
/home/azakai/.emscripten_cache/wasm_bc/wasm_compiler_rt.a
/home/azakai/.emscripten_cache/wasm_bc/wasm_libc_rt.a --max-memory=16777216
-mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj
-mllvm -disable-lsr --export main --export malloc --export free --export
setTempRet0 --export setThrew --export __errno_location --export fflush
--export emscripten_GetAlProcAddress --export emscripten_GetAlcProcAddress
--export strcmp 
1.      Running pass 'Add prototypes to prototypes-less functions' on module
'ld-temp.o'.
/home/azakai/Dev/sdk/upstream/37040/bin/../lib/libLLVM-8svn.so(+0x64f6e4)[0x7fdd0e3bc6e4]
/home/azakai/Dev/sdk/upstream/37040/bin/../lib/libLLVM-8svn.so(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x7fdd0e3ba58e]
/home/azakai/Dev/sdk/upstream/37040/bin/../lib/libLLVM-8svn.so(+0x64f8a8)[0x7fdd0e3bc8a8]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x110c0)[0x7fdd10fab0c0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xcf)[0x7fdd0d15ffcf]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7fdd0d1613fa]
/lib/x86_64-linux-gnu/libc.so.6(+0x2be37)[0x7fdd0d158e37]
/lib/x86_64-linux-gnu/libc.so.6(+0x2bee2)[0x7fdd0d158ee2]
/home/azakai/Dev/sdk/upstream/37040/bin/../lib/libLLVM-8svn.so(+0x1d95415)[0x7fdd0fb02415]
/home/azakai/Dev/sdk/upstream/37040/bin/../lib/libLLVM-8svn.so(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x4ea)[0x7fdd0e5024aa]
/home/azakai/Dev/sdk/upstream/37040/bin/../lib/libLLVM-8svn.so(+0x17d860b)[0x7fdd0f54560b]
/home/azakai/Dev/sdk/upstream/37040/bin/../lib/libLLVM-8svn.so(_ZN4llvm3lto7backendERNS0_6ConfigESt8functionIFSt10unique_ptrINS0_18NativeObjectStreamESt14default_deleteIS5_EEjEEjS4_INS_6ModuleES6_ISB_EERNS_18ModuleSummaryIndexE+0x166)[0x7fdd0f543566]
/home/azakai/Dev/sdk/upstream/37040/bin/../lib/libLLVM-8svn.so(_ZN4llvm3lto3LTO13runRegularLTOESt8functionIFSt10unique_ptrINS0_18NativeObjectStreamESt14default_deleteIS4_EEjEE+0x3ad)[0x7fdd0f53abbd]
/home/azakai/Dev/sdk/upstream/37040/bin/../lib/libLLVM-8svn.so(_ZN4llvm3lto3LTO3runESt8functionIFSt10unique_ptrINS0_18NativeObjectStreamESt14default_deleteIS4_EEjEES2_IFS9_jNS_9StringRefEEE+0x3d6)[0x7fdd0f53a606]
/home/azakai/Dev/sdk/upstream/37040/bin/wasm-ld[0x659153]
/home/azakai/Dev/sdk/upstream/37040/bin/wasm-ld[0x65a5c9]
/home/azakai/Dev/sdk/upstream/37040/bin/wasm-ld[0x64ac64]
/home/azakai/Dev/sdk/upstream/37040/bin/wasm-ld[0x6479f5]
/home/azakai/Dev/sdk/upstream/37040/bin/wasm-ld[0x41a979]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1)[0x7fdd0d14d2b1]
/home/azakai/Dev/sdk/upstream/37040/bin/wasm-ld[0x41a54a]
ERROR:root:'/home/azakai/Dev/sdk/upstream/37040/bin/wasm-ld --export-dynamic -z
stack-size=5242880 --global-base=1024 --initial-memory=16777216 -o
/tmp/tmpcXLCZS/a.out.wasm --no-entry --allow-undefined --import-memory --export
__wasm_call_ctors --export __data_end --lto-O0 /tmp/tmpcXLCZS/al_0.o
/home/azakai/.emscripten_cache/wasm_bc/libc.bc
/home/azakai/.emscripten_cache/wasm_bc/wasm-libc.bc
/home/azakai/.emscripten_cache/wasm_bc/dlmalloc.bc
/home/azakai/.emscripten_cache/wasm_bc/compiler-rt.a
/home/azakai/.emscripten_cache/wasm_bc/wasm_compiler_rt.a
/home/azakai/.emscripten_cache/wasm_bc/wasm_libc_rt.a --max-memory=16777216
-mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj
-mllvm -disable-lsr --export main --export malloc --export free --export
setTempRet0 --export setThrew --export __errno_location --export fflush
--export emscripten_GetAlProcAddress --export emscripten_GetAlcProcAddress
--export strcmp' failed (-6)
azakai@azakai:~/Dev/emscripten$</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>