<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 - clang debug info generation for WebAssembly does not work with -fno-integrated-as"
href="https://bugs.llvm.org/show_bug.cgi?id=49036">49036</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang debug info generation for WebAssembly does not work with -fno-integrated-as
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Backend: WebAssembly
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>nickysn@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=24480" name="attach_24480" title="Example program that can be use to reproduce this bug">attachment 24480</a> <a href="attachment.cgi?id=24480&action=edit" title="Example program that can be use to reproduce this bug">[details]</a></span>
Example program that can be use to reproduce this bug
Using LLVM built from the git main branch, commit
ba87f99168c93461b28a4aa2d05e238ff774d57a.
clang --target=wasm32 -v -g -fno-integrated-as debug.c -o debug.wasm
gives the following errors:
clang version 13.0.0 (<a href="https://github.com/llvm/llvm-project.git">https://github.com/llvm/llvm-project.git</a>
ba87f99168c93461b28a4aa2d05e238ff774d57a)
Target: wasm32
Thread model: posix
InstalledDir: /home/nickysn/tralala/llvm/llvm-project/build/bin
"/home/nickysn/tralala/llvm/llvm-project/build/bin/clang-13" -cc1 -triple
wasm32 -S -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name debug.c -mrelocation-model static -mframe-pointer=none
-fno-rounding-math -no-integrated-as -mconstructor-aliases -target-cpu generic
-fvisibility hidden -debug-info-kind=limited -dwarf-version=4
-debugger-tuning=gdb -v -resource-dir
/home/nickysn/tralala/llvm/llvm-project/build/lib/clang/13.0.0
-internal-isystem
/home/nickysn/tralala/llvm/llvm-project/build/lib/clang/13.0.0/include
-internal-isystem /include -fno-dwarf-directory-asm -fdebug-compilation-dir
/home/nickysn/tralala/fpc-wasm/wasi/ctest/debug -ferror-limit 19
-fgnuc-version=4.2.1 -fcolor-diagnostics -o /tmp/debug-b15aaa.s -x c debug.c
clang -cc1 version 13.0.0 based upon LLVM 13.0.0git default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/home/nickysn/tralala/llvm/llvm-project/build/lib/clang/13.0.0/include
End of search list.
"/home/nickysn/tralala/llvm/llvm-project/build/bin/clang-13" -cc1as -triple
wasm32 -filetype obj -main-file-name debug.c -target-cpu generic
-dwarf-version=4 -mrelocation-model static -mrelax-all --mrelax-relocations -o
/tmp/debug-ae345d.o /tmp/debug-b15aaa.s
/tmp/debug-b15aaa.s:15:14: error: End of block construct with no start:
end_function
end_function
^
/tmp/debug-b15aaa.s:31:14: error: End of block construct with no start:
end_function
end_function
^
/tmp/debug-b15aaa.s:44:11: error: .local directive should follow the start of a
functioni32
.local i32, i32, i32, i32, i32, i32, i32, i32, i32, i32, i32,
i32
^
/tmp/debug-b15aaa.s:104:14: error: End of block construct with no start:
end_function
end_function
^
/tmp/debug-b15aaa.s:116:11: error: .local directive should follow the start of
a functioni32
.local i32
^
/tmp/debug-b15aaa.s:122:14: error: End of block construct with no start:
end_function
end_function
^
Compilation with "-g", but without "-fno-integrated-as" works.
Compilation without "-g", but with "-fno-integrated-as" also works.
Compilation for other targets (linux x86_64) with both "-g" and
"-fno-integrated-as" also works.</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>