[LLVMdev] llvm-as regression

Bagel bagel99 at gmail.com
Fri Jul 24 13:21:29 PDT 2009


The following causes an assertion in recent svn pulls, but not in 2.5.

The assertion:

llvm-as: /home/bgl/work/llvm-work/include/llvm/ADT/SmallVector.h:125: T& 
llvm::SmallVectorImpl<T>::operator[](unsigned int) [with T = llvm::Constant*]: 
Assertion `Begin + idx < End' failed.

The .ll code:

target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:32"
target triple = "x86-unknown-unknown"
@foo = constant [4 x [0 x i8]*] [
[0 x i8]* bitcast( [5 x i8]* getelementptr( [5 x i8]* @.str1 )  to [0 x i8]* ),
[0 x i8]* bitcast( [4 x i8]* getelementptr( [4 x i8]* @.str2 )  to [0 x i8]* ),
[0 x i8]* bitcast( [4 x i8]* getelementptr( [4 x i8]* @.str3 )  to [0 x i8]* ),
[0 x i8]* bitcast( [6 x i8]* getelementptr( [6 x i8]* @.str4 )  to [0 x i8]* )
]
@.str1 = internal constant [5 x i8] c"zero\00"
@.str2 = internal constant [4 x i8] c"one\00"
@.str3 = internal constant [4 x i8] c"two\00"
@.str4 = internal constant [6 x i8] c"three\00"

I'm not sure how to proceed on tracking down the cause.




More information about the llvm-dev mailing list