[LLVMbugs] [Bug 22523] New: Unwind tables can't be generated when using inline asm

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Feb 9 11:48:21 PST 2015


http://llvm.org/bugs/show_bug.cgi?id=22523

            Bug ID: 22523
           Summary: Unwind tables can't be generated when using inline asm
           Product: clang
           Version: 3.5
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: mjbshaw at hotmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 13830
  --> http://llvm.org/bugs/attachment.cgi?id=13830&action=edit
The first file requested by the clang diagnostic message

If I compile a very simple C++ program, clang crashes complaining that the
address of an intrinsic cannot be taken. As far as I can tell, clang should be
able to compile this, and the fact that it cannot is a bug. The invocation and
output are:

$ clang++-3.5 -v -emit-llvm -target mipsel -o out.bc -c t.cc              ⏎ ✱ ◼
clang version 3.5.1 (tags/RELEASE_351/final)
Target: mipsel
Thread model: posix
 "/usr/local/Cellar/llvm35/3.5.1/lib/llvm-3.5/bin/clang" -cc1 -triple mipsel
-emit-llvm-bc -disable-free -main-file-name t.cc -mrelocation-model static
-mdisable-fp-elim -fmath-errno -no-integrated-as -mconstructor-aliases
-target-cpu mips32r2 -target-feature -n64 -target-feature +o32 -target-abi o32
-mfloat-abi hard -target-linker-version 241.9 -v -dwarf-column-info
-coverage-file /Users/mjbshaw/School/cs6960/a2/pathtracer/out.bc -resource-dir
/usr/local/Cellar/llvm35/3.5.1/lib/llvm-3.5/bin/../lib/clang/3.5.1
-fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir
/Users/mjbshaw/School/cs6960/a2/pathtracer -ferror-limit 19 -fmessage-length
112 -mstackrealign -fobjc-runtime=gcc -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -fcolor-diagnostics -o out.bc -x c++ t.cc
clang -cc1 version 3.5.1 based upon LLVM 3.5.1 default target
x86_64-apple-darwin14.1.0
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/local/Cellar/llvm35/3.5.1/lib/llvm-3.5/bin/../lib/clang/3.5.1/include
 /usr/include
End of search list.
Cannot take the address of an intrinsic!
  %call = invoke i32 @llvm.mips.loadi(i32 signext 0, i32 signext 0)
          to label %invoke.cont unwind label %lpad
Cannot take the address of an intrinsic!
  %call = invoke i32 @llvm.mips.loadi(i32 signext 0, i32 signext 0)
          to label %invoke.cont unwind label %lpad
fatal error: error in backend: Broken function found, compilation aborted!
clang: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 3.5.1 (tags/RELEASE_351/final)
Target: mipsel
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and
associated run script.
clang: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg:
/var/folders/vf/2d0_lsz10zz_31khhsxhsn5r0000gn/T/t-8d447b.cpp
clang: note: diagnostic msg:
/var/folders/vf/2d0_lsz10zz_31khhsxhsn5r0000gn/T/t-8d447b.sh
clang: note: diagnostic msg: 

********************



If I compile with -fno-exceptions, then it compiles successfully (presumably
because there are no unwind tables being created). Additionally, if I move the
declaration/definition of the variable foo to *after* the loadi function call,
then it compiles successfully (even without -fno-exceptions).

-- 
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/20150209/bcff1a46/attachment.html>


More information about the llvm-bugs mailing list