[LLVMbugs] [Bug 10286] New: Compiling code using labels as pointers produces <badref>s in disassembly

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 6 09:22:29 PDT 2011


           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: unassignedclangbugs at nondot.org
        ReportedBy: max99x at gmail.com
                CC: llvmbugs at cs.uiuc.edu

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.

More information about the llvm-bugs mailing list