[llvm-bugs] [Bug 42420] New: error in backend: Functions with 'no-prototype' attribute should not have params

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Jun 27 04:59:07 PDT 2019


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

            Bug ID: 42420
           Summary: error in backend: Functions with 'no-prototype'
                    attribute should not have params
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: ethanoldale at gmail.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 22150
  --> https://bugs.llvm.org/attachment.cgi?id=22150&action=edit
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
https://bugs.llvm.org/ 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

-- 
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/20190627/4eafd327/attachment-0001.html>


More information about the llvm-bugs mailing list