[LLVMbugs] [Bug 7539] New: llc crashes on functions with union as an argument

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jun 30 22:18:17 PDT 2010


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

           Summary: llc crashes on functions with union as an argument
           Product: libraries
           Version: 2.7
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: matt.giuca at gmail.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=5151)
 --> (http://llvm.org/bugs/attachment.cgi?id=5151)
Simplified test case which crashes llc

Any function I try with a union as an argument seems to compile OK until it
gets to llc, and then I get an error "UNREACHABLE executed!" An example
(bitcode attached):

target triple = "i386-pc-linux-gnu"

define void @union_fail(union { i32 } %x) nounwind readnone {
entry:
  ret void
}

Note that it's fine if you pass a pointer to a union, just not a union object,
struct containing a union, etc. With --march=x86:

UNREACHABLE executed!
0  libLLVM-2.7.so.1 0x017e4698
Stack dump:
0.    Program arguments: llc bugpoint-reduced-simplified.ll 
1.    Running pass 'X86 DAG->DAG Instruction Selection' on function
'@union_fail'
Aborted

I tried a number of architectures, and they all crash on different passes, but
with the same error. For example, --march=arm:

UNREACHABLE executed!
0  libLLVM-2.7.so.1 0x018a7698
Stack dump:
0.    Program arguments: llc --march=arm bugpoint-reduced-simplified.ll 
1.    Running pass 'ARM Instruction Selection' on function '@union_fail'
Aborted

This affects all architectures, so I have filed it under Common Code Generator
Code.

Running Ubuntu 10.04, using the version of LLVM that came with Ubuntu 10.04
(llvm 2.7-0ubuntu1).

-- 
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