[LLVMdev] Interesting optimization failure.
Duncan Sands
baldrick at free.fr
Wed Jul 16 03:04:54 PDT 2008
Hi Richard,
> I have been working on using arrays and structs as first class objects.
good to hear! The example doesn't make use of that though, does it?
> I have this small function:
>
> int main()
> {
> char ar[10] = "12";
> return ar[4];
> }
...
> define i32 @main() nounwind {
> entry:
> ret i32 49
> }
>
Here I get
define i32 @main() nounwind {
entry:
ret i32 0
}
at -O1 and above.
Ciao,
Duncan.
More information about the llvm-dev
mailing list