compiler: fix stack overflow when creating recursive pointer types

There were two types that could result in a compiler stack overflow.
This is difficult to fix in LLVM 14, so I won't even bother. However,
this is trivial to fix with opaque pointers in LLVM 15. Therefore, this
fix is for LLVM 15 only.

Fixes: https://github.com/tinygo-org/tinygo/issues/3341
This commit is contained in:
Ayke van Laethem
2022-12-22 00:48:12 +00:00
committed by Ron Evans
parent 481aba6536
commit 9fd0567fb5
4 changed files with 22 additions and 6 deletions
+6
View File
@@ -90,3 +90,9 @@ func foo() {
// Use this type.
func(b kv) {}(kv{})
}
type T1 []T1
type T2 [2]*T2
var a T1
var b T2