[llvm-bugs] [Bug 34901] New: fatal error: error in backend: Wasm COMDATs only support SelectionKind:Any, 'function' cannot be lowered

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 10 04:54:04 PDT 2017


https://bugs.llvm.org/show_bug.cgi?id=34901

            Bug ID: 34901
           Summary: fatal error: error in backend: Wasm COMDATs only
                    support SelectionKind:Any, 'function' cannot be
                    lowered
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mark at chavfreezone.me.uk
                CC: llvm-bugs at lists.llvm.org

Created attachment 19258
  --> https://bugs.llvm.org/attachment.cgi?id=19258&action=edit
preprocessed source and associated run script

Testing the wasm32-unknown-unknown-wasm target in an attempt to see how stable
the wasm backend is with a test case, but get the following error:

fatal error: error in backend: Wasm COMDATs only support SelectionKind::Any,
'_ZN16PermutationTable7SetSeedEi' cannot 
      be lowered.                                                               
clang.exe: error: clang frontend command failed with exit code 70 (use -v to
see invocation)           

clang version is 6.0.0 (trunk 314790) (llvm/trunk 315211)

Context:
The test case I wrote was in relation to the issue I raised here:
https://github.com/WebAssembly/binaryen/issues/1215 in relation to the startup
functions being exported with periods in their names which rendered them
unaccessible in the browser.

The code is stable when I add a main function and compile to it an exe on
windows, and if I have clang output the bitcode and pass it through llc, s2wasm
and wat2wasm I get a usable .wasm file (ignoring the fact that the startup
function isn't accessible so all the GetPermAt function returns is 0s).
Commands to produce the .wasm file from bitcode are below:

> clang -c -v --target=wasm32 -std=c++14 -emit-llvm -Oz main.cpp
> llc -O2 main.bc -o main.s
> s2wasm main.s > main.wat
> wat2wasm main.wat -o main.wasm

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171010/faaccd81/attachment-0001.html>


More information about the llvm-bugs mailing list