Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

panic: compileVArg: unknown value - *ssa.Parameter #821

Open
cpunion opened this issue Oct 8, 2024 · 1 comment
Open

panic: compileVArg: unknown value - *ssa.Parameter #821

cpunion opened this issue Oct 8, 2024 · 1 comment

Comments

@cpunion
Copy link
Contributor

cpunion commented Oct 8, 2024

package main

type Base struct{}

func (b *Base) Print(__llgo_va_list ...any) {
}

type Derived struct {
	Base
}

func main() {}

Compiling errors:

panic: compileVArg: unknown value - *ssa.Parameter


goroutine 1 [running]:
github.com/goplus/llgo/cl.(*context).compileVArg(0x14000149930?, {0x14005537f40?, 0x1029e5260?, 0x140019d4720?}, 0x14000475008?, {0x1029e5968?, 0x1400026c820?})
	/Users/lijie/source/goplus/llgo/cl/compile.go:831 +0x1d8
github.com/goplus/llgo/cl.(*context).compileValues(0x14000149930?, 0x14000c324e0?, {0x14005801bc0, 0x2, 0x14000475038?}, 0x1)
	/Users/lijie/source/goplus/llgo/cl/compile.go:841 +0x140
github.com/goplus/llgo/cl.(*context).call(0x14000149930, 0x140017f8c90, 0x14005801c80?, 0x14005618b40)
	/Users/lijie/source/goplus/llgo/cl/instr.go:362 +0x41c
github.com/goplus/llgo/cl.(*context).compileInstrOrValue(0x14000149930, 0x140017f8c90, {0x1029e7278?, 0x14005618b00?}, 0x88?)
	/Users/lijie/source/goplus/llgo/cl/compile.go:494 +0x1c8
github.com/goplus/llgo/cl.(*context).compileInstr(0x14000149930, 0x140017f8c90, {0x1029e4eb8?, 0x14005618b00?})
	/Users/lijie/source/goplus/llgo/cl/compile.go:661 +0x6f8
github.com/goplus/llgo/cl.(*context).compileBlock(0x14000149930, 0x140017f8c90, 0x1400588fd90, 0x0, 0x0, 0x0)
	/Users/lijie/source/goplus/llgo/cl/compile.go:345 +0x414
github.com/goplus/llgo/cl.(*context).compileFuncDecl.func1()
	/Users/lijie/source/goplus/llgo/cl/compile.go:278 +0x448
github.com/goplus/llgo/cl.NewPackageEx(0x140001f2000, 0x14000cf95c0, 0x14005618900, {0x1400019e250, 0x1, 0x1})
	/Users/lijie/source/goplus/llgo/cl/compile.go:920 +0x6b8
github.com/goplus/llgo/internal/build.buildPkg(0x140019d40c0, 0x140058018a0, 0x0)
	/Users/lijie/source/goplus/llgo/internal/build/build.go:499 +0x2bc
github.com/goplus/llgo/internal/build.buildAllPkgs(0x140019d40c0, {0x1400019e320?, 0x14000030580?, 0x1028bfc64?}, 0x0?)
	/Users/lijie/source/goplus/llgo/internal/build/build.go:333 +0x360
github.com/goplus/llgo/internal/build.Do({0x140001821a0?, 0x2f?, 0x1028bfc7f?}, 0x1400046be20)
	/Users/lijie/source/goplus/llgo/internal/build/build.go:198 +0xa10
github.com/goplus/llgo/cmd/internal/build.runCmd(0x140001a0120?, {0x140001821a0?, 0x140000586e8?, 0x102602424?})
	/Users/lijie/source/goplus/llgo/cmd/internal/build/build.go:44 +0xa0
main.main()
	/Users/lijie/source/goplus/llgo/cmd/llgo/llgo.go:90 +0x4c8
@MeteorsLiu
Copy link
Contributor

Same issue,

Panic code:

// llgo:link AgerrlevelT.Agerr C.agerr
func (recv_ AgerrlevelT) Agerr(fmt *int8, __llgo_va_list ...interface{}) c.Int {
	return 0
}
//go:linkname Agerrorf C.agerrorf
func Agerrorf(fmt *int8, __llgo_va_list ...interface{})
//go:linkname Agwarningf C.agwarningf
func Agwarningf(fmt *int8, __llgo_va_list ...interface{})

It seems that LLGo dones't support VA args currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants