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

           Summary: Compiling code using labels as pointers produces
                    <badref>s in disassembly
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Created an attachment (id=6840)
 --> (http://llvm.org/bugs/attachment.cgi?id=6840)
C source and resulting bytecode disassembly

When compiling the attached program with clang -c -emit-llvm -m32, then
disassembling the result with llvm-dis -show-annotations, the produced LL (also
attached) contains <badref> instead of labels. Compiling straight away without
-emit-llvm and disassembling produces a valid program.

This happens on both 2.9 (from Arch Linux repositories) and trunk (built
manually). Trunk configured with:

../llvm/configure --disable-debug-symbols --enable-optimized
--disable-debug-runtime --disable-assertions --enable-multilib
--with-cxx-include-32bit-dir=/usr/lib32 -with-cxx-include-32bit-dir=/usr/lib

Works fine on llvm-gcc.

The code comes from the emscripten test suite
(https://github.com/kripken/emscripten), whose maintainer could not reproduce
the issue.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to