[LLVMbugs] [Bug 2145] New: llvm-gcc emits invalid aliases

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Wed Mar 12 15:51:46 PDT 2008


           Summary: llvm-gcc emits invalid aliases
           Product: tools
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: llvm-gcc
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: daniel at zuster.org
                CC: llvmbugs at cs.uiuc.edu

Created an attachment (id=1538)
 --> (http://llvm.org/bugs/attachment.cgi?id=1538)
problem input

The attached code emits an alias that references another alias, which generates
invalid bitcode (according to the assembly documentation). It isn't clear to me
whether or not this is intended to work. The x86 backend compiles it fine but
AsmWriter fails on it, and linking it as bytecode does not seem to work (more
testcases available on request).

ddunbar at ozzy:test$ llvm-gcc -c test.c && nm test.o
00000000 T a
00000000 T b
00000000 T c
ddunbar at ozzy:test$ llvm-gcc -O4 -c test.c && llvm-nm test.o
         T a
         T b
         ? c
ddunbar at ozzy:test$ llvm-gcc -O4 -c test.c && llc test.o
ddunbar at ozzy:test$ llvm-gcc -O4 -c test.c && llvm-dis test.o
llvm-dis: AsmWriter.cpp:1012: void llvm::AssemblyWriter::printAlias(const
llvm::GlobalAlias*): Assertion `0 && "Unsupported aliasee"' failed.

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