Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

gllgo: "unimplemented conversion" error #176

Closed
dvyukov opened this issue May 26, 2014 · 0 comments
Closed

gllgo: "unimplemented conversion" error #176

dvyukov opened this issue May 26, 2014 · 0 comments
Assignees
Labels

Comments

@dvyukov
Copy link

dvyukov commented May 26, 2014

I am on commit a143e91 in libgo branch.

Build the following program with gllgo:
https://gist.github.com/dvyukov/95bdd2b43e17c69fe0f4

$ go build -compiler=gccgo /tmp/llgo1.go
panic: unimplemented conversion: **bool (PointerType(IntegerType(8 bits))) -> *bool

goroutine 16 [running]:
runtime.panic(0x1f81860, 0xc208169110)
src/pkg/runtime/panic.c:279 +0xf5 fp=0xc2081c1fd0
github.com/go-llvm/llgo.(_frame).convert(0xc208216600, 0xc208223ac0, 0x7fb712a5b6b8, 0xc2080c83f0, 0xac107c)
github.com/go-llvm/llgo/value.go:622 +0x164b fp=0xc2081c22e8
github.com/go-llvm/llgo.(_frame).chanSend(0xc208216600, 0xc208223bc0, 0xc208223ac0)
github.com/go-llvm/llgo/channels.go:23 +0xa0 fp=0xc2081c2370
github.com/go-llvm/llgo.(_frame).instruction(0xc208216600, 0x7fb712a60a40, 0xc20818de30)
github.com/go-llvm/llgo/ssa.go:966 +0x1ebf fp=0xc2081c30d0
github.com/go-llvm/llgo.(_frame).translateBlock(0xc208216600, 0xc20800f1e0, 0x7fb70003c770)
github.com/go-llvm/llgo/ssa.go:542 +0x14b fp=0xc2081c3120
github.com/go-llvm/llgo.(_unit).defineFunction(0xc2080b08c0, 0xc208042f00)
github.com/go-llvm/llgo/ssa.go:342 +0x1cf9 fp=0xc2081c3608
github.com/go-llvm/llgo.(_unit).defineFunctionsInOrder(0xc2080b08c0, 0xc20815ecc0)
github.com/go-llvm/llgo/ssa.go:77 +0x1f5 fp=0xc2081c3710
github.com/go-llvm/llgo.(_unit).translatePackage(0xc2080b08c0, 0xc20805c1c0)
github.com/go-llvm/llgo/ssa.go:115 +0x314 fp=0xc2081c3850
github.com/go-llvm/llgo.(_compiler).compile(0xc20800e2c0, 0xc208000540, 0x1, 0x1, 0xc208000938, 0x4, 0x0, 0x0, 0x0)
github.com/go-llvm/llgo/compiler.go:221 +0xa5d fp=0xc2081c3a38
github.com/go-llvm/llgo.(*Compiler).Compile(0xc20805c000, 0xc208000540, 0x1, 0x1, 0x0, 0x0, 0x2f6aa0c, 0xac5155, 0x2fad158)
github.com/go-llvm/llgo/compiler.go:102 +0x12e fp=0xc2081c3aa0
main.performAction(0xc20802a0d0, 0x1, 0xc208000540, 0x1, 0x1, 0x7fffaab9313e, 0x39, 0x0, 0x0)
github.com/go-llvm/llgo/cmd/gllgo/gllgo.go:326 +0xf6 fp=0xc2081c3cd8
main.performActions(0xc20802a0d0, 0x0, 0x0)
github.com/go-llvm/llgo/cmd/gllgo/gllgo.go:481 +0x2b0 fp=0xc2081c3e28
main.main()
github.com/go-llvm/llgo/cmd/gllgo/gllgo.go:505 +0xf3 fp=0xc2081c3f50
runtime.main()
src/pkg/runtime/proc.c:247 +0x11a fp=0xc2081c3fa8

It does not print the line number, so I can't minimize the program.

@axw axw added the GoSmith label May 27, 2014
@axw axw self-assigned this Jun 2, 2014
axw added a commit to axw/llgo that referenced this issue Jun 2, 2014
FreeVars have the right (pointer) type to begin with,
so we should not explicitly create a pointer type.

Fixes go-llvm#176
@axw axw closed this as completed Jun 2, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants