Closed mewmew closed 8 years ago
Hopefully fixed in commit 66b23f7 :) Re-open this issue if any further relevant issues are identified.
Re-open the issue as it was closed prematurely. The following test case is still failing.
irgen_test.go:321: "../testdata/extra/irgen/issue_73_pointer_pointer_ref.c": module mismatch; expected `define void @f(i32* %x) {
; <label>:0
%1 = alloca i32*
store i32* %x, i32** %1
%2 = load i32*, i32** %1
ret void
}
`, got `define void @f(i32* %x) {
; <label>:0
%1 = alloca i32*
store i32* %x, i32** %1
ret void
}
`
Fixed as of commit 862aae2.
Dereference nested pointers with load instructions before using getelementptr to access retrieve pointers to elements.
This feature affects the following test cases.
Invalid getelementptr indices
testdata/extra/irgen/array_param.c
testdata/noisy/advanced/8queens.c
testdata/noisy/simple/sim11.c
testdata/quiet/semantic/s04.c
testdata/quiet/semantic/s03.c
testdata/quiet/semantic/s02.c
testdata/quiet/mips/m01.c
testdata/quiet/rtl/r05.c