Created
September 25, 2011 21:36
-
-
Save asterite/1241187 to your computer and use it in GitHub Desktop.
llvm segfault
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%Bar = type { i32 } | |
%Foo = type { %Bar* } | |
@.str5 = private constant [4 x i8] c"%d\0A\00", align 1 | |
declare i32 @printf(i8* nocapture, ...) nounwind | |
define i32 @main() ssp { | |
entry: | |
%Bar.i.i.i.i = alloca %Bar, align 8 | |
%Foo.i.i.i = alloca %Foo, align 8 | |
%"@bar.i.i.i" = getelementptr inbounds %Foo* %Foo.i.i.i, i64 0, i32 0 | |
store %Bar* %Bar.i.i.i.i, %Bar** %"@bar.i.i.i", align 8 | |
%"@field.i.i.i.i" = getelementptr inbounds %Bar* %Bar.i.i.i.i, i64 0, i32 0 | |
store i32 20, i32* %"@field.i.i.i.i", align 4 | |
%0 = load %Bar** %"@bar.i.i.i", align 8 | |
%1 = getelementptr inbounds %Foo* %Foo.i.i.i, i64 0, i32 0 | |
%2 = load %Bar** %1, align 8 | |
%3 = getelementptr inbounds %Bar* %2, i64 0, i32 0 | |
%4 = load i32* %3, align 4 | |
%5 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([4 x i8]* @.str5, i64 0, i64 0), i32 %4) nounwind | |
ret i32 0 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment