<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 - error in backend: Functions with 'no-prototype' attribute should not have params"
href="https://bugs.llvm.org/show_bug.cgi?id=42420">42420</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>error in backend: Functions with 'no-prototype' attribute should not have params
</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>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>ethanoldale@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=22150" name="attach_22150" title="the run script">attachment 22150</a> <a href="attachment.cgi?id=22150&action=edit" title="the run script">[details]</a></span>
the run script
error in backend: Functions with 'no-prototype' attribute should not have
params: make_foo
to reproduce:
emcc foo.c
foo.c:
struct foo {
int bar, baz;
};
struct foo make_foo();
void test()
{
struct foo foo = make_foo();
}
expected behaviour:
successfull compilation
actual behaviour:
backend error
Emscripten version: 1.38.34
clang version: 9.0.0
system: ArchLinux
the error doesn't happen if foo only has one int or if make_foo is defined
in the same translation unit.
the code compiles fine if the target is x86_64, but fails when targeting
webassembly
emcc output:
fatal error: error in backend: Functions with 'no-prototype' attribute should
not have params: make_foo
clang-9: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 9.0.0 (/startdir/llvm-project
58dbe47b9c64bafcc8b430e8bfea92f7fe641c8e)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /usr/lib/emscripten-llvm
clang-9: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang-9: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-9: note: diagnostic msg: /tmp/foo-998150.c
clang-9: note: diagnostic msg: /tmp/foo-998150.sh
clang-9: note: diagnostic msg:
********************
shared:ERROR: compiler frontend failed to generate LLVM bitcode, halting</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>