Update linux-x86 Go prebuilts from ab/8921581

https://ci.android.com/builds/branches/aosp-build-tools-release/grid?head=8921581&tail=8921581

Update script: toolchain/go/update-prebuilts.sh

Test: Treehugger presubmit
Change-Id: Ieac5e31af3fa5d5e6122345d7e22913f1e187662
diff --git a/test/closure5.dir/main.go b/test/closure5.dir/main.go
index ee5dba6..30b3784 100644
--- a/test/closure5.dir/main.go
+++ b/test/closure5.dir/main.go
@@ -6,7 +6,7 @@
 // that are expected to be inlined
 package main
 
-import "a"
+import "./a"
 
 func main() {
 	if !a.G()()() {
diff --git a/test/codegen/bitfield.go b/test/codegen/bitfield.go
index 8327da6..11f31ec 100644
--- a/test/codegen/bitfield.go
+++ b/test/codegen/bitfield.go
@@ -321,6 +321,12 @@
 	return false
 }
 
+// merge ANDconst and ubfx into ubfx
+func ubfx16(x uint64) uint64 {
+	// arm64:"UBFX\t[$]4, R[0-9]+, [$]6",-"AND\t[$]63"
+	return ((x >> 3) & 0xfff) >> 1 & 0x3f
+}
+
 // Check that we don't emit comparisons for constant shifts.
 //go:nosplit
 func shift_no_cmp(x int) int {
diff --git a/test/codegen/bmi.go b/test/codegen/bmi.go
index 0c25e0b..3b125a1 100644
--- a/test/codegen/bmi.go
+++ b/test/codegen/bmi.go
@@ -45,3 +45,61 @@
 	// amd64/v3:"BLSRL"
 	return x & (x - 1)
 }
+
+func sarx64(x, y int64) int64 {
+	// amd64/v3:"SARXQ"
+	return x >> y
+}
+
+func sarx32(x, y int32) int32 {
+	// amd64/v3:"SARXL"
+	return x >> y
+}
+
+func sarx64_load(x []int64, i int) int64 {
+	// amd64/v3: `SARXQ\t[A-Z]+[0-9]*, \([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\), [A-Z]+[0-9]*`
+	s := x[i] >> (i & 63)
+	// amd64/v3: `SARXQ\t[A-Z]+[0-9]*, 8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\), [A-Z]+[0-9]*`
+	s = x[i+1] >> (s & 63)
+	return s
+}
+
+func sarx32_load(x []int32, i int) int32 {
+	// amd64/v3: `SARXL\t[A-Z]+[0-9]*, \([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\), [A-Z]+[0-9]*`
+	s := x[i] >> (i & 63)
+	// amd64/v3: `SARXL\t[A-Z]+[0-9]*, 4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\), [A-Z]+[0-9]*`
+	s = x[i+1] >> (s & 63)
+	return s
+}
+
+func shlrx64(x, y uint64) uint64 {
+	// amd64/v3:"SHRXQ"
+	s := x >> y
+	// amd64/v3:"SHLXQ"
+	s = s << y
+	return s
+}
+
+func shlrx32(x, y uint32) uint32 {
+	// amd64/v3:"SHRXL"
+	s := x >> y
+	// amd64/v3:"SHLXL"
+	s = s << y
+	return s
+}
+
+func shlrx64_load(x []uint64, i int, s uint64) uint64 {
+	// amd64/v3: `SHRXQ\t[A-Z]+[0-9]*, \([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\), [A-Z]+[0-9]*`
+	s = x[i] >> i
+	// amd64/v3: `SHLXQ\t[A-Z]+[0-9]*, 8\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*8\), [A-Z]+[0-9]*`
+	s = x[i+1] << s
+	return s
+}
+
+func shlrx32_load(x []uint32, i int, s uint32) uint32 {
+	// amd64/v3: `SHRXL\t[A-Z]+[0-9]*, \([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\), [A-Z]+[0-9]*`
+	s = x[i] >> i
+	// amd64/v3: `SHLXL\t[A-Z]+[0-9]*, 4\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*4\), [A-Z]+[0-9]*`
+	s = x[i+1] << s
+	return s
+}
diff --git a/test/codegen/clobberdead.go b/test/codegen/clobberdead.go
index c490790..732be5f 100644
--- a/test/codegen/clobberdead.go
+++ b/test/codegen/clobberdead.go
@@ -15,16 +15,16 @@
 func F() {
 	// 3735936685 is 0xdeaddead. On ARM64 R27 is REGTMP.
 	// clobber x, y at entry. not clobber z (stack object).
-	// amd64:`MOVL\t\$3735936685, ""\.x`, `MOVL\t\$3735936685, ""\.y`, -`MOVL\t\$3735936685, ""\.z`
-	// arm64:`MOVW\tR27, ""\.x`, `MOVW\tR27, ""\.y`, -`MOVW\tR27, ""\.z`
+	// amd64:`MOVL\t\$3735936685, command-line-arguments\.x`, `MOVL\t\$3735936685, command-line-arguments\.y`, -`MOVL\t\$3735936685, command-line-arguments\.z`
+	// arm64:`MOVW\tR27, command-line-arguments\.x`, `MOVW\tR27, command-line-arguments\.y`, -`MOVW\tR27, command-line-arguments\.z`
 	x, y, z := p1, p2, p3
 	addrTaken(&z)
 	// x is dead at the call (the value of x is loaded before the CALL), y is not
-	// amd64:`MOVL\t\$3735936685, ""\.x`, -`MOVL\t\$3735936685, ""\.y`
-	// arm64:`MOVW\tR27, ""\.x`, -`MOVW\tR27, ""\.y`
+	// amd64:`MOVL\t\$3735936685, command-line-arguments\.x`, -`MOVL\t\$3735936685, command-line-arguments\.y`
+	// arm64:`MOVW\tR27, command-line-arguments\.x`, -`MOVW\tR27, command-line-arguments\.y`
 	use(x)
-	// amd64:`MOVL\t\$3735936685, ""\.x`, `MOVL\t\$3735936685, ""\.y`
-	// arm64:`MOVW\tR27, ""\.x`, `MOVW\tR27, ""\.y`
+	// amd64:`MOVL\t\$3735936685, command-line-arguments\.x`, `MOVL\t\$3735936685, command-line-arguments\.y`
+	// arm64:`MOVW\tR27, command-line-arguments\.x`, `MOVW\tR27, command-line-arguments\.y`
 	use(y)
 }
 
diff --git a/test/codegen/comparisons.go b/test/codegen/comparisons.go
index fd32ea3..7e9d474 100644
--- a/test/codegen/comparisons.go
+++ b/test/codegen/comparisons.go
@@ -45,7 +45,7 @@
 // Check that arrays compare use 2/4/8 byte compares
 
 func CompareArray1(a, b [2]byte) bool {
-	// amd64:`CMPW\t""[.+_a-z0-9]+\(SP\), [A-Z]`
+	// amd64:`CMPW\tcommand-line-arguments[.+_a-z0-9]+\(SP\), [A-Z]`
 	// arm64:-`MOVBU\t`
 	// ppc64le:-`MOVBZ\t`
 	// s390x:-`MOVBZ\t`
@@ -53,25 +53,25 @@
 }
 
 func CompareArray2(a, b [3]uint16) bool {
-	// amd64:`CMPL\t""[.+_a-z0-9]+\(SP\), [A-Z]`
-	// amd64:`CMPW\t""[.+_a-z0-9]+\(SP\), [A-Z]`
+	// amd64:`CMPL\tcommand-line-arguments[.+_a-z0-9]+\(SP\), [A-Z]`
+	// amd64:`CMPW\tcommand-line-arguments[.+_a-z0-9]+\(SP\), [A-Z]`
 	return a == b
 }
 
 func CompareArray3(a, b [3]int16) bool {
-	// amd64:`CMPL\t""[.+_a-z0-9]+\(SP\), [A-Z]`
-	// amd64:`CMPW\t""[.+_a-z0-9]+\(SP\), [A-Z]`
+	// amd64:`CMPL\tcommand-line-arguments[.+_a-z0-9]+\(SP\), [A-Z]`
+	// amd64:`CMPW\tcommand-line-arguments[.+_a-z0-9]+\(SP\), [A-Z]`
 	return a == b
 }
 
 func CompareArray4(a, b [12]int8) bool {
-	// amd64:`CMPQ\t""[.+_a-z0-9]+\(SP\), [A-Z]`
-	// amd64:`CMPL\t""[.+_a-z0-9]+\(SP\), [A-Z]`
+	// amd64:`CMPQ\tcommand-line-arguments[.+_a-z0-9]+\(SP\), [A-Z]`
+	// amd64:`CMPL\tcommand-line-arguments[.+_a-z0-9]+\(SP\), [A-Z]`
 	return a == b
 }
 
 func CompareArray5(a, b [15]byte) bool {
-	// amd64:`CMPQ\t""[.+_a-z0-9]+\(SP\), [A-Z]`
+	// amd64:`CMPQ\tcommand-line-arguments[.+_a-z0-9]+\(SP\), [A-Z]`
 	return a == b
 }
 
@@ -161,7 +161,7 @@
 	}
 }
 
-func CmpToZero(a, b, d int32, e, f int64) int32 {
+func CmpToZero(a, b, d int32, e, f int64, deOptC0, deOptC1 bool) int32 {
 	// arm:`TST`,-`AND`
 	// arm64:`TSTW`,-`AND`
 	// 386:`TESTL`,-`ANDL`
@@ -201,13 +201,17 @@
 	} else if c4 {
 		return 5
 	} else if c5 {
-		return b + d
+		return 6
 	} else if c6 {
-		return a & d
-	} else if c7 {
 		return 7
+	} else if c7 {
+		return 9
 	} else if c8 {
-		return 8
+		return 10
+	} else if deOptC0 {
+		return b + d
+	} else if deOptC1 {
+		return a & d
 	} else {
 		return 0
 	}
diff --git a/test/codegen/issue52635.go b/test/codegen/issue52635.go
new file mode 100644
index 0000000..0e4d169
--- /dev/null
+++ b/test/codegen/issue52635.go
@@ -0,0 +1,36 @@
+// asmcheck
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that optimized range memclr works with pointers to arrays.
+
+package codegen
+
+type T struct {
+	a *[10]int
+	b [10]int
+}
+
+func (t *T) f() {
+	// amd64:".*runtime.memclrNoHeapPointers"
+	for i := range t.a {
+		t.a[i] = 0
+	}
+
+	// amd64:".*runtime.memclrNoHeapPointers"
+	for i := range *t.a {
+		t.a[i] = 0
+	}
+
+	// amd64:".*runtime.memclrNoHeapPointers"
+	for i := range t.a {
+		(*t.a)[i] = 0
+	}
+
+	// amd64:".*runtime.memclrNoHeapPointers"
+	for i := range *t.a {
+		(*t.a)[i] = 0
+	}
+}
diff --git a/test/codegen/logic.go b/test/codegen/logic.go
index 9afdfd7..50ce5f0 100644
--- a/test/codegen/logic.go
+++ b/test/codegen/logic.go
@@ -22,3 +22,11 @@
 	// use z by returning it
 	return z
 }
+
+// Verify (OR x (NOT y)) rewrites to (ORN x y) where supported
+func ornot(x, y int) int {
+	// ppc64:"ORN"
+	// ppc64le:"ORN"
+	z := x | ^y
+	return z
+}
diff --git a/test/codegen/maps.go b/test/codegen/maps.go
index dcb4a93..ea3a70d 100644
--- a/test/codegen/maps.go
+++ b/test/codegen/maps.go
@@ -122,3 +122,33 @@
 	}
 	return k
 }
+
+func MapLiteralSizing(x int) (map[int]int, map[int]int) {
+	// amd64:"MOVL\t[$]10,"
+	m := map[int]int{
+		0: 0,
+		1: 1,
+		2: 2,
+		3: 3,
+		4: 4,
+		5: 5,
+		6: 6,
+		7: 7,
+		8: 8,
+		9: 9,
+	}
+	// amd64:"MOVL\t[$]10,"
+	n := map[int]int{
+		0: x,
+		1: x,
+		2: x,
+		3: x,
+		4: x,
+		5: x,
+		6: x,
+		7: x,
+		8: x,
+		9: x,
+	}
+	return m, n
+}
diff --git a/test/codegen/mathbits.go b/test/codegen/mathbits.go
index 859490c..1ddb5c7 100644
--- a/test/codegen/mathbits.go
+++ b/test/codegen/mathbits.go
@@ -13,7 +13,8 @@
 // ----------------------- //
 
 func LeadingZeros(n uint) int {
-	// amd64:"BSRQ"
+	// amd64/v1,amd64/v2:"BSRQ"
+	// amd64/v3:"LZCNTQ", -"BSRQ"
 	// s390x:"FLOGR"
 	// arm:"CLZ" arm64:"CLZ"
 	// mips:"CLZ"
@@ -22,7 +23,8 @@
 }
 
 func LeadingZeros64(n uint64) int {
-	// amd64:"BSRQ"
+	// amd64/v1,amd64/v2:"BSRQ"
+	// amd64/v3:"LZCNTQ", -"BSRQ"
 	// s390x:"FLOGR"
 	// arm:"CLZ" arm64:"CLZ"
 	// mips:"CLZ"
@@ -31,7 +33,8 @@
 }
 
 func LeadingZeros32(n uint32) int {
-	// amd64:"BSRQ","LEAQ",-"CMOVQEQ"
+	// amd64/v1,amd64/v2:"BSRQ","LEAQ",-"CMOVQEQ"
+	// amd64/v3: "LZCNTL",- "BSRL"
 	// s390x:"FLOGR"
 	// arm:"CLZ" arm64:"CLZW"
 	// mips:"CLZ"
@@ -40,7 +43,8 @@
 }
 
 func LeadingZeros16(n uint16) int {
-	// amd64:"BSRL","LEAL",-"CMOVQEQ"
+	// amd64/v1,amd64/v2:"BSRL","LEAL",-"CMOVQEQ"
+	// amd64/v3: "LZCNTL",- "BSRL"
 	// s390x:"FLOGR"
 	// arm:"CLZ" arm64:"CLZ"
 	// mips:"CLZ"
@@ -49,7 +53,8 @@
 }
 
 func LeadingZeros8(n uint8) int {
-	// amd64:"BSRL","LEAL",-"CMOVQEQ"
+	// amd64/v1,amd64/v2:"BSRL","LEAL",-"CMOVQEQ"
+	// amd64/v3: "LZCNTL",- "BSRL"
 	// s390x:"FLOGR"
 	// arm:"CLZ" arm64:"CLZ"
 	// mips:"CLZ"
@@ -62,7 +67,8 @@
 // --------------- //
 
 func Len(n uint) int {
-	// amd64:"BSRQ"
+	// amd64/v1,amd64/v2:"BSRQ"
+	// amd64/v3: "LZCNTQ"
 	// s390x:"FLOGR"
 	// arm:"CLZ" arm64:"CLZ"
 	// mips:"CLZ"
@@ -71,7 +77,8 @@
 }
 
 func Len64(n uint64) int {
-	// amd64:"BSRQ"
+	// amd64/v1,amd64/v2:"BSRQ"
+	// amd64/v3: "LZCNTQ"
 	// s390x:"FLOGR"
 	// arm:"CLZ" arm64:"CLZ"
 	// mips:"CLZ"
@@ -88,7 +95,8 @@
 }
 
 func Len32(n uint32) int {
-	// amd64:"BSRQ","LEAQ",-"CMOVQEQ"
+	// amd64/v1,amd64/v2:"BSRQ","LEAQ",-"CMOVQEQ"
+	// amd64/v3: "LZCNTL"
 	// s390x:"FLOGR"
 	// arm:"CLZ" arm64:"CLZ"
 	// mips:"CLZ"
@@ -99,7 +107,8 @@
 }
 
 func Len16(n uint16) int {
-	// amd64:"BSRL","LEAL",-"CMOVQEQ"
+	// amd64/v1,amd64/v2:"BSRL","LEAL",-"CMOVQEQ"
+	// amd64/v3: "LZCNTL"
 	// s390x:"FLOGR"
 	// arm:"CLZ" arm64:"CLZ"
 	// mips:"CLZ"
@@ -108,7 +117,8 @@
 }
 
 func Len8(n uint8) int {
-	// amd64:"BSRL","LEAL",-"CMOVQEQ"
+	// amd64/v1,amd64/v2:"BSRL","LEAL",-"CMOVQEQ"
+	// amd64/v3: "LZCNTL"
 	// s390x:"FLOGR"
 	// arm:"CLZ" arm64:"CLZ"
 	// mips:"CLZ"
@@ -413,6 +423,8 @@
 func Add(x, y, ci uint) (r, co uint) {
 	// arm64:"ADDS","ADCS","ADC",-"ADD\t",-"CMP"
 	// amd64:"NEGL","ADCQ","SBBQ","NEGQ"
+	// ppc64: "ADDC", "ADDE", "ADDZE"
+	// ppc64le: "ADDC", "ADDE", "ADDZE"
 	// s390x:"ADDE","ADDC\t[$]-1,"
 	return bits.Add(x, y, ci)
 }
@@ -420,6 +432,8 @@
 func AddC(x, ci uint) (r, co uint) {
 	// arm64:"ADDS","ADCS","ADC",-"ADD\t",-"CMP"
 	// amd64:"NEGL","ADCQ","SBBQ","NEGQ"
+	// ppc64: "ADDC", "ADDE", "ADDZE"
+	// ppc64le: "ADDC", "ADDE", "ADDZE"
 	// s390x:"ADDE","ADDC\t[$]-1,"
 	return bits.Add(x, 7, ci)
 }
@@ -427,6 +441,8 @@
 func AddZ(x, y uint) (r, co uint) {
 	// arm64:"ADDS","ADC",-"ADCS",-"ADD\t",-"CMP"
 	// amd64:"ADDQ","SBBQ","NEGQ",-"NEGL",-"ADCQ"
+	// ppc64: "ADDC", -"ADDE", "ADDZE"
+	// ppc64le: "ADDC", -"ADDE", "ADDZE"
 	// s390x:"ADDC",-"ADDC\t[$]-1,"
 	return bits.Add(x, y, 0)
 }
@@ -434,6 +450,8 @@
 func AddR(x, y, ci uint) uint {
 	// arm64:"ADDS","ADCS",-"ADD\t",-"CMP"
 	// amd64:"NEGL","ADCQ",-"SBBQ",-"NEGQ"
+	// ppc64: "ADDC", "ADDE", -"ADDZE"
+	// ppc64le: "ADDC", "ADDE", -"ADDZE"
 	// s390x:"ADDE","ADDC\t[$]-1,"
 	r, _ := bits.Add(x, y, ci)
 	return r
@@ -470,8 +488,8 @@
 func Add64Z(x, y uint64) (r, co uint64) {
 	// arm64:"ADDS","ADC",-"ADCS",-"ADD\t",-"CMP"
 	// amd64:"ADDQ","SBBQ","NEGQ",-"NEGL",-"ADCQ"
-	// ppc64: "ADDC", "ADDE", "ADDZE"
-	// ppc64le: "ADDC", "ADDE", "ADDZE"
+	// ppc64: "ADDC", -"ADDE", "ADDZE"
+	// ppc64le: "ADDC", -"ADDE", "ADDZE"
 	// s390x:"ADDC",-"ADDC\t[$]-1,"
 	return bits.Add64(x, y, 0)
 }
@@ -479,8 +497,8 @@
 func Add64R(x, y, ci uint64) uint64 {
 	// arm64:"ADDS","ADCS",-"ADD\t",-"CMP"
 	// amd64:"NEGL","ADCQ",-"SBBQ",-"NEGQ"
-	// ppc64: "ADDC", "ADDE", "ADDZE"
-	// ppc64le: "ADDC", "ADDE", "ADDZE"
+	// ppc64: "ADDC", "ADDE", -"ADDZE"
+	// ppc64le: "ADDC", "ADDE", -"ADDZE"
 	// s390x:"ADDE","ADDC\t[$]-1,"
 	r, _ := bits.Add64(x, y, ci)
 	return r
@@ -490,13 +508,22 @@
 	r[0], c = bits.Add64(p[0], q[0], c)
 	// arm64:"ADCS",-"ADD\t",-"CMP"
 	// amd64:"ADCQ",-"NEGL",-"SBBQ",-"NEGQ"
-	// ppc64: "ADDC", "ADDE", "ADDZE"
-	// ppc64le: "ADDC", "ADDE", "ADDZE"
+	// ppc64: -"ADDC", "ADDE", -"ADDZE"
+	// ppc64le: -"ADDC", "ADDE", -"ADDZE"
 	// s390x:"ADDE",-"ADDC\t[$]-1,"
 	r[1], c = bits.Add64(p[1], q[1], c)
 	r[2], c = bits.Add64(p[2], q[2], c)
 }
 
+func Add64MSaveC(p, q, r, c *[2]uint64) {
+	// ppc64: "ADDC\tR", "ADDZE"
+	// ppc64le: "ADDC\tR", "ADDZE"
+	r[0], c[0] = bits.Add64(p[0], q[0], 0)
+	// ppc64: "ADDC\t[$]-1", "ADDE", "ADDZE"
+	// ppc64le: "ADDC\t[$]-1", "ADDE", "ADDZE"
+	r[1], c[1] = bits.Add64(p[1], q[1], c[0])
+}
+
 func Add64PanicOnOverflowEQ(a, b uint64) uint64 {
 	r, c := bits.Add64(a, b, 0)
 	// s390x:"BRC\t[$]3,",-"ADDE"
@@ -567,6 +594,8 @@
 func Sub(x, y, ci uint) (r, co uint) {
 	// amd64:"NEGL","SBBQ","NEGQ"
 	// arm64:"NEGS","SBCS","NGC","NEG",-"ADD",-"SUB",-"CMP"
+	// ppc64:"SUBC", "SUBE", "SUBZE", "NEG"
+	// ppc64le:"SUBC", "SUBE", "SUBZE", "NEG"
 	// s390x:"SUBE"
 	return bits.Sub(x, y, ci)
 }
@@ -574,6 +603,8 @@
 func SubC(x, ci uint) (r, co uint) {
 	// amd64:"NEGL","SBBQ","NEGQ"
 	// arm64:"NEGS","SBCS","NGC","NEG",-"ADD",-"SUB",-"CMP"
+	// ppc64:"SUBC", "SUBE", "SUBZE", "NEG"
+	// ppc64le:"SUBC", "SUBE", "SUBZE", "NEG"
 	// s390x:"SUBE"
 	return bits.Sub(x, 7, ci)
 }
@@ -581,6 +612,8 @@
 func SubZ(x, y uint) (r, co uint) {
 	// amd64:"SUBQ","SBBQ","NEGQ",-"NEGL"
 	// arm64:"SUBS","NGC","NEG",-"SBCS",-"ADD",-"SUB\t",-"CMP"
+	// ppc64:"SUBC", -"SUBE", "SUBZE", "NEG"
+	// ppc64le:"SUBC", -"SUBE", "SUBZE", "NEG"
 	// s390x:"SUBC"
 	return bits.Sub(x, y, 0)
 }
@@ -588,6 +621,8 @@
 func SubR(x, y, ci uint) uint {
 	// amd64:"NEGL","SBBQ",-"NEGQ"
 	// arm64:"NEGS","SBCS",-"NGC",-"NEG\t",-"ADD",-"SUB",-"CMP"
+	// ppc64:"SUBC", "SUBE", -"SUBZE", -"NEG"
+	// ppc64le:"SUBC", "SUBE", -"SUBZE", -"NEG"
 	// s390x:"SUBE"
 	r, _ := bits.Sub(x, y, ci)
 	return r
@@ -597,6 +632,8 @@
 	r[0], c = bits.Sub(p[0], q[0], c)
 	// amd64:"SBBQ",-"NEGL",-"NEGQ"
 	// arm64:"SBCS",-"NEGS",-"NGC",-"NEG",-"ADD",-"SUB",-"CMP"
+	// ppc64:-"SUBC", "SUBE", -"SUBZE", -"NEG"
+	// ppc64le:-"SUBC", "SUBE", -"SUBZE", -"NEG"
 	// s390x:"SUBE"
 	r[1], c = bits.Sub(p[1], q[1], c)
 	r[2], c = bits.Sub(p[2], q[2], c)
@@ -605,6 +642,8 @@
 func Sub64(x, y, ci uint64) (r, co uint64) {
 	// amd64:"NEGL","SBBQ","NEGQ"
 	// arm64:"NEGS","SBCS","NGC","NEG",-"ADD",-"SUB",-"CMP"
+	// ppc64:"SUBC", "SUBE", "SUBZE", "NEG"
+	// ppc64le:"SUBC", "SUBE", "SUBZE", "NEG"
 	// s390x:"SUBE"
 	return bits.Sub64(x, y, ci)
 }
@@ -612,6 +651,8 @@
 func Sub64C(x, ci uint64) (r, co uint64) {
 	// amd64:"NEGL","SBBQ","NEGQ"
 	// arm64:"NEGS","SBCS","NGC","NEG",-"ADD",-"SUB",-"CMP"
+	// ppc64:"SUBC", "SUBE", "SUBZE", "NEG"
+	// ppc64le:"SUBC", "SUBE", "SUBZE", "NEG"
 	// s390x:"SUBE"
 	return bits.Sub64(x, 7, ci)
 }
@@ -619,6 +660,8 @@
 func Sub64Z(x, y uint64) (r, co uint64) {
 	// amd64:"SUBQ","SBBQ","NEGQ",-"NEGL"
 	// arm64:"SUBS","NGC","NEG",-"SBCS",-"ADD",-"SUB\t",-"CMP"
+	// ppc64:"SUBC", -"SUBE", "SUBZE", "NEG"
+	// ppc64le:"SUBC", -"SUBE", "SUBZE", "NEG"
 	// s390x:"SUBC"
 	return bits.Sub64(x, y, 0)
 }
@@ -626,6 +669,8 @@
 func Sub64R(x, y, ci uint64) uint64 {
 	// amd64:"NEGL","SBBQ",-"NEGQ"
 	// arm64:"NEGS","SBCS",-"NGC",-"NEG\t",-"ADD",-"SUB",-"CMP"
+	// ppc64:"SUBC", "SUBE", -"SUBZE", -"NEG"
+	// ppc64le:"SUBC", "SUBE", -"SUBZE", -"NEG"
 	// s390x:"SUBE"
 	r, _ := bits.Sub64(x, y, ci)
 	return r
@@ -640,6 +685,15 @@
 	r[2], c = bits.Sub64(p[2], q[2], c)
 }
 
+func Sub64MSaveC(p, q, r, c *[2]uint64) {
+	// ppc64:"SUBC\tR\\d+, R\\d+,", "SUBZE", "NEG"
+	// ppc64le:"SUBC\tR\\d+, R\\d+,", "SUBZE", "NEG"
+	r[0], c[0] = bits.Sub64(p[0], q[0], 0)
+	// ppc64:"SUBC\tR\\d+, [$]0,", "SUBE", "SUBZE", "NEG"
+	// ppc64le:"SUBC\tR\\d+, [$]0,", "SUBE", "SUBZE", "NEG"
+	r[1], c[1] = bits.Sub64(p[1], q[1], c[0])
+}
+
 func Sub64PanicOnOverflowEQ(a, b uint64) uint64 {
 	r, b := bits.Sub64(a, b, 0)
 	// s390x:"BRC\t[$]12,",-"ADDE",-"SUBE"
diff --git a/test/codegen/memcombine.go b/test/codegen/memcombine.go
index 97e1d4b..1427f7a 100644
--- a/test/codegen/memcombine.go
+++ b/test/codegen/memcombine.go
@@ -11,114 +11,110 @@
 	"runtime"
 )
 
-var sink64 uint64
-var sink32 uint32
-var sink16 uint16
-
 // ------------- //
 //    Loading    //
 // ------------- //
 
-func load_le64(b []byte) {
+func load_le64(b []byte) uint64 {
 	// amd64:`MOVQ\s\(.*\),`,-`MOV[BWL]\t[^$]`,-`OR`
 	// s390x:`MOVDBR\s\(.*\),`
 	// arm64:`MOVD\s\(R[0-9]+\),`,-`MOV[BHW]`
 	// ppc64le:`MOVD\s`,-`MOV[BHW]Z`
-	sink64 = binary.LittleEndian.Uint64(b)
+	return binary.LittleEndian.Uint64(b)
 }
 
-func load_le64_idx(b []byte, idx int) {
+func load_le64_idx(b []byte, idx int) uint64 {
 	// amd64:`MOVQ\s\(.*\)\(.*\*1\),`,-`MOV[BWL]\t[^$]`,-`OR`
 	// s390x:`MOVDBR\s\(.*\)\(.*\*1\),`
 	// arm64:`MOVD\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOV[BHW]`
 	// ppc64le:`MOVD\s`,-`MOV[BHW]Z\s`
-	sink64 = binary.LittleEndian.Uint64(b[idx:])
+	return binary.LittleEndian.Uint64(b[idx:])
 }
 
-func load_le32(b []byte) {
+func load_le32(b []byte) uint32 {
 	// amd64:`MOVL\s\(.*\),`,-`MOV[BW]`,-`OR`
 	// 386:`MOVL\s\(.*\),`,-`MOV[BW]`,-`OR`
 	// s390x:`MOVWBR\s\(.*\),`
 	// arm64:`MOVWU\s\(R[0-9]+\),`,-`MOV[BH]`
 	// ppc64le:`MOVWZ\s`,-`MOV[BH]Z\s`
-	sink32 = binary.LittleEndian.Uint32(b)
+	return binary.LittleEndian.Uint32(b)
 }
 
-func load_le32_idx(b []byte, idx int) {
+func load_le32_idx(b []byte, idx int) uint32 {
 	// amd64:`MOVL\s\(.*\)\(.*\*1\),`,-`MOV[BW]`,-`OR`
 	// 386:`MOVL\s\(.*\)\(.*\*1\),`,-`MOV[BW]`,-`OR`
 	// s390x:`MOVWBR\s\(.*\)\(.*\*1\),`
 	// arm64:`MOVWU\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOV[BH]`
 	// ppc64le:`MOVWZ\s`,-`MOV[BH]Z\s`
-	sink32 = binary.LittleEndian.Uint32(b[idx:])
+	return binary.LittleEndian.Uint32(b[idx:])
 }
 
-func load_le16(b []byte) {
+func load_le16(b []byte) uint16 {
 	// amd64:`MOVWLZX\s\(.*\),`,-`MOVB`,-`OR`
 	// ppc64le:`MOVHZ\s`,-`MOVBZ`
 	// arm64:`MOVHU\s\(R[0-9]+\),`,-`MOVB`
 	// s390x:`MOVHBR\s\(.*\),`
-	sink16 = binary.LittleEndian.Uint16(b)
+	return binary.LittleEndian.Uint16(b)
 }
 
-func load_le16_idx(b []byte, idx int) {
+func load_le16_idx(b []byte, idx int) uint16 {
 	// amd64:`MOVWLZX\s\(.*\),`,-`MOVB`,-`OR`
 	// ppc64le:`MOVHZ\s`,-`MOVBZ`
 	// arm64:`MOVHU\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOVB`
 	// s390x:`MOVHBR\s\(.*\)\(.*\*1\),`
-	sink16 = binary.LittleEndian.Uint16(b[idx:])
+	return binary.LittleEndian.Uint16(b[idx:])
 }
 
-func load_be64(b []byte) {
+func load_be64(b []byte) uint64 {
 	// amd64/v1,amd64/v2:`BSWAPQ`,-`MOV[BWL]\t[^$]`,-`OR`
 	// amd64/v3:`MOVBEQ`
 	// s390x:`MOVD\s\(.*\),`
 	// arm64:`REV`,`MOVD\s\(R[0-9]+\),`,-`MOV[BHW]`,-`REVW`,-`REV16W`
 	// ppc64le:`MOVDBR`,-`MOV[BHW]Z`
-	sink64 = binary.BigEndian.Uint64(b)
+	return binary.BigEndian.Uint64(b)
 }
 
-func load_be64_idx(b []byte, idx int) {
+func load_be64_idx(b []byte, idx int) uint64 {
 	// amd64/v1,amd64/v2:`BSWAPQ`,-`MOV[BWL]\t[^$]`,-`OR`
-	// amd64/v3: `MOVBEQ`
+	// amd64/v3: `MOVBEQ\t\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*1\), [A-Z]+[0-9]*`
 	// s390x:`MOVD\s\(.*\)\(.*\*1\),`
 	// arm64:`REV`,`MOVD\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOV[WHB]`,-`REVW`,-`REV16W`
 	// ppc64le:`MOVDBR`,-`MOV[BHW]Z`
-	sink64 = binary.BigEndian.Uint64(b[idx:])
+	return binary.BigEndian.Uint64(b[idx:])
 }
 
-func load_be32(b []byte) {
+func load_be32(b []byte) uint32 {
 	// amd64/v1,amd64/v2:`BSWAPL`,-`MOV[BW]`,-`OR`
 	// amd64/v3: `MOVBEL`
 	// s390x:`MOVWZ\s\(.*\),`
 	// arm64:`REVW`,`MOVWU\s\(R[0-9]+\),`,-`MOV[BH]`,-`REV16W`
 	// ppc64le:`MOVWBR`,-`MOV[BH]Z`
-	sink32 = binary.BigEndian.Uint32(b)
+	return binary.BigEndian.Uint32(b)
 }
 
-func load_be32_idx(b []byte, idx int) {
+func load_be32_idx(b []byte, idx int) uint32 {
 	// amd64/v1,amd64/v2:`BSWAPL`,-`MOV[BW]`,-`OR`
-	// amd64/v3: `MOVBEL`
+	// amd64/v3: `MOVBEL\t\([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*1\), [A-Z]+[0-9]*`
 	// s390x:`MOVWZ\s\(.*\)\(.*\*1\),`
 	// arm64:`REVW`,`MOVWU\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOV[HB]`,-`REV16W`
 	// ppc64le:`MOVWBR`,-`MOV[BH]Z`
-	sink32 = binary.BigEndian.Uint32(b[idx:])
+	return binary.BigEndian.Uint32(b[idx:])
 }
 
-func load_be16(b []byte) {
+func load_be16(b []byte) uint16 {
 	// amd64:`ROLW\s\$8`,-`MOVB`,-`OR`
 	// arm64:`REV16W`,`MOVHU\s\(R[0-9]+\),`,-`MOVB`
 	// ppc64le:`MOVHBR`
 	// s390x:`MOVHZ\s\(.*\),`,-`OR`,-`ORW`,-`SLD`,-`SLW`
-	sink16 = binary.BigEndian.Uint16(b)
+	return binary.BigEndian.Uint16(b)
 }
 
-func load_be16_idx(b []byte, idx int) {
+func load_be16_idx(b []byte, idx int) uint16 {
 	// amd64:`ROLW\s\$8`,-`MOVB`,-`OR`
 	// arm64:`REV16W`,`MOVHU\s\(R[0-9]+\)\(R[0-9]+\),`,-`MOVB`
 	// ppc64le:`MOVHBR`
 	// s390x:`MOVHZ\s\(.*\)\(.*\*1\),`,-`OR`,-`ORW`,-`SLD`,-`SLW`
-	sink16 = binary.BigEndian.Uint16(b[idx:])
+	return binary.BigEndian.Uint16(b[idx:])
 }
 
 func load_le_byte2_uint16(s []byte) uint16 {
@@ -339,7 +335,7 @@
 
 // Make sure offsets are folded into loads and stores.
 func offsets_fold(_, a [20]byte) (b [20]byte) {
-	// arm64:`MOVD\t""\.a\+[0-9]+\(FP\), R[0-9]+`,`MOVD\tR[0-9]+, ""\.b\+[0-9]+\(FP\)`
+	// arm64:`MOVD\tcommand-line-arguments\.a\+[0-9]+\(FP\), R[0-9]+`,`MOVD\tR[0-9]+, command-line-arguments\.b\+[0-9]+\(FP\)`
 	b = a
 	return
 }
@@ -357,20 +353,20 @@
 //    Storing    //
 // ------------- //
 
-func store_le64(b []byte) {
+func store_le64(b []byte, x uint64) {
 	// amd64:`MOVQ\s.*\(.*\)$`,-`SHR.`
 	// arm64:`MOVD`,-`MOV[WBH]`
 	// ppc64le:`MOVD\s`,-`MOV[BHW]\s`
 	// s390x:`MOVDBR\s.*\(.*\)$`
-	binary.LittleEndian.PutUint64(b, sink64)
+	binary.LittleEndian.PutUint64(b, x)
 }
 
-func store_le64_idx(b []byte, idx int) {
+func store_le64_idx(b []byte, x uint64, idx int) {
 	// amd64:`MOVQ\s.*\(.*\)\(.*\*1\)$`,-`SHR.`
 	// arm64:`MOVD\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOV[BHW]`
 	// ppc64le:`MOVD\s`,-`MOV[BHW]\s`
 	// s390x:`MOVDBR\s.*\(.*\)\(.*\*1\)$`
-	binary.LittleEndian.PutUint64(b[idx:], sink64)
+	binary.LittleEndian.PutUint64(b[idx:], x)
 }
 
 func store_le64_load(b []byte, x *[8]byte) {
@@ -382,63 +378,63 @@
 	binary.LittleEndian.PutUint64(b, binary.LittleEndian.Uint64(x[:]))
 }
 
-func store_le32(b []byte) {
+func store_le32(b []byte, x uint32) {
 	// amd64:`MOVL\s`
 	// arm64:`MOVW`,-`MOV[BH]`
 	// ppc64le:`MOVW\s`
 	// s390x:`MOVWBR\s.*\(.*\)$`
-	binary.LittleEndian.PutUint32(b, sink32)
+	binary.LittleEndian.PutUint32(b, x)
 }
 
-func store_le32_idx(b []byte, idx int) {
+func store_le32_idx(b []byte, x uint32, idx int) {
 	// amd64:`MOVL\s`
 	// arm64:`MOVW\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOV[BH]`
 	// ppc64le:`MOVW\s`
 	// s390x:`MOVWBR\s.*\(.*\)\(.*\*1\)$`
-	binary.LittleEndian.PutUint32(b[idx:], sink32)
+	binary.LittleEndian.PutUint32(b[idx:], x)
 }
 
-func store_le16(b []byte) {
+func store_le16(b []byte, x uint16) {
 	// amd64:`MOVW\s`
 	// arm64:`MOVH`,-`MOVB`
 	// ppc64le:`MOVH\s`
 	// s390x:`MOVHBR\s.*\(.*\)$`
-	binary.LittleEndian.PutUint16(b, sink16)
+	binary.LittleEndian.PutUint16(b, x)
 }
 
-func store_le16_idx(b []byte, idx int) {
+func store_le16_idx(b []byte, x uint16, idx int) {
 	// amd64:`MOVW\s`
 	// arm64:`MOVH\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOVB`
 	// ppc64le:`MOVH\s`
 	// s390x:`MOVHBR\s.*\(.*\)\(.*\*1\)$`
-	binary.LittleEndian.PutUint16(b[idx:], sink16)
+	binary.LittleEndian.PutUint16(b[idx:], x)
 }
 
-func store_be64(b []byte) {
+func store_be64(b []byte, x uint64) {
 	// amd64/v1,amd64/v2:`BSWAPQ`,-`SHR.`
 	// amd64/v3: `MOVBEQ`
 	// arm64:`MOVD`,`REV`,-`MOV[WBH]`,-`REVW`,-`REV16W`
 	// ppc64le:`MOVDBR`
 	// s390x:`MOVD\s.*\(.*\)$`,-`SRW\s`,-`SRD\s`
-	binary.BigEndian.PutUint64(b, sink64)
+	binary.BigEndian.PutUint64(b, x)
 }
 
-func store_be64_idx(b []byte, idx int) {
+func store_be64_idx(b []byte, x uint64, idx int) {
 	// amd64/v1,amd64/v2:`BSWAPQ`,-`SHR.`
-	// amd64/v3:`MOVBEQ`
+	// amd64/v3:`MOVBEQ\t[A-Z]+[0-9]*, \([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*1\)`
 	// arm64:`REV`,`MOVD\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOV[BHW]`,-`REV16W`,-`REVW`
 	// ppc64le:`MOVDBR`
 	// s390x:`MOVD\s.*\(.*\)\(.*\*1\)$`,-`SRW\s`,-`SRD\s`
-	binary.BigEndian.PutUint64(b[idx:], sink64)
+	binary.BigEndian.PutUint64(b[idx:], x)
 }
 
-func store_be32(b []byte) {
+func store_be32(b []byte, x uint32) {
 	// amd64/v1,amd64/v2:`BSWAPL`,-`SHR.`
 	// amd64/v3:`MOVBEL`
 	// arm64:`MOVW`,`REVW`,-`MOV[BH]`,-`REV16W`
 	// ppc64le:`MOVWBR`
 	// s390x:`MOVW\s.*\(.*\)$`,-`SRW\s`,-`SRD\s`
-	binary.BigEndian.PutUint32(b, sink32)
+	binary.BigEndian.PutUint32(b, x)
 }
 
 func store_be64_load(b, x *[8]byte) {
@@ -453,29 +449,31 @@
 	binary.BigEndian.PutUint32(b[:], binary.BigEndian.Uint32(x[:]))
 }
 
-func store_be32_idx(b []byte, idx int) {
+func store_be32_idx(b []byte, x uint32, idx int) {
 	// amd64/v1,amd64/v2:`BSWAPL`,-`SHR.`
-	// amd64/v3:`MOVBEL`
+	// amd64/v3:`MOVBEL\t[A-Z]+[0-9]*, \([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*1\)`
 	// arm64:`REVW`,`MOVW\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,-`MOV[BH]`,-`REV16W`
 	// ppc64le:`MOVWBR`
 	// s390x:`MOVW\s.*\(.*\)\(.*\*1\)$`,-`SRW\s`,-`SRD\s`
-	binary.BigEndian.PutUint32(b[idx:], sink32)
+	binary.BigEndian.PutUint32(b[idx:], x)
 }
 
-func store_be16(b []byte) {
-	// amd64:`ROLW\s\$8`,-`SHR.`
+func store_be16(b []byte, x uint16) {
+	// amd64/v1,amd64/v2:`ROLW\s\$8`,-`SHR.`
+	// amd64/v3:`MOVBEW`,-`ROLW`
 	// arm64:`MOVH`,`REV16W`,-`MOVB`
 	// ppc64le:`MOVHBR`
 	// s390x:`MOVH\s.*\(.*\)$`,-`SRW\s`,-`SRD\s`
-	binary.BigEndian.PutUint16(b, sink16)
+	binary.BigEndian.PutUint16(b, x)
 }
 
-func store_be16_idx(b []byte, idx int) {
-	// amd64:`ROLW\s\$8`,-`SHR.`
+func store_be16_idx(b []byte, x uint16, idx int) {
+	// amd64/v1,amd64/v2:`ROLW\s\$8`,-`SHR.`
+	// amd64/v3:`MOVBEW\t[A-Z]+[0-9]*, \([A-Z]+[0-9]*\)\([A-Z]+[0-9]*\*1\)`
 	// arm64:`MOVH\sR[0-9]+,\s\(R[0-9]+\)\(R[0-9]+\)`,`REV16W`,-`MOVB`
 	// ppc64le:`MOVHBR`
 	// s390x:`MOVH\s.*\(.*\)\(.*\*1\)$`,-`SRW\s`,-`SRD\s`
-	binary.BigEndian.PutUint16(b[idx:], sink16)
+	binary.BigEndian.PutUint16(b[idx:], x)
 }
 
 func store_le_byte_2(b []byte, val uint16) {
@@ -511,7 +509,8 @@
 func store_be_byte_2(b []byte, val uint16) {
 	_ = b[2]
 	// arm64:`REV16W`,`MOVH\sR[0-9]+,\s1\(R[0-9]+\)`,-`MOVB`
-	// amd64:`MOVW\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`
+	// amd64/v1,amd64/v2:`MOVW\s[A-Z]+,\s1\([A-Z]+\)`,-`MOVB`
+	// amd64/v3: `MOVBEW`
 	b[1], b[2] = byte(val>>8), byte(val)
 }
 
diff --git a/test/codegen/memops.go b/test/codegen/memops.go
index fb8208f..7e59d88 100644
--- a/test/codegen/memops.go
+++ b/test/codegen/memops.go
@@ -13,23 +13,23 @@
 var x64 [2]uint64
 
 func compMem1() int {
-	// amd64:`CMPB\t"".x\+1\(SB\), [$]0`
+	// amd64:`CMPB\tcommand-line-arguments.x\+1\(SB\), [$]0`
 	if x[1] {
 		return 1
 	}
-	// amd64:`CMPB\t"".x8\+1\(SB\), [$]7`
+	// amd64:`CMPB\tcommand-line-arguments.x8\+1\(SB\), [$]7`
 	if x8[1] == 7 {
 		return 1
 	}
-	// amd64:`CMPW\t"".x16\+2\(SB\), [$]7`
+	// amd64:`CMPW\tcommand-line-arguments.x16\+2\(SB\), [$]7`
 	if x16[1] == 7 {
 		return 1
 	}
-	// amd64:`CMPL\t"".x32\+4\(SB\), [$]7`
+	// amd64:`CMPL\tcommand-line-arguments.x32\+4\(SB\), [$]7`
 	if x32[1] == 7 {
 		return 1
 	}
-	// amd64:`CMPQ\t"".x64\+8\(SB\), [$]7`
+	// amd64:`CMPQ\tcommand-line-arguments.x64\+8\(SB\), [$]7`
 	if x64[1] == 7 {
 		return 1
 	}
diff --git a/test/codegen/select.go b/test/codegen/select.go
index 4426924..82f6d1c 100644
--- a/test/codegen/select.go
+++ b/test/codegen/select.go
@@ -10,7 +10,7 @@
 	ch1 := make(chan int)
 	ch2 := make(chan int)
 	for {
-		// amd64:-`MOVQ\t[$]0, ""..autotmp_3`
+		// amd64:-`MOVQ\t[$]0, command-line-arguments..autotmp_3`
 		select {
 		case <-ch1:
 		case <-ch2:
diff --git a/test/codegen/switch.go b/test/codegen/switch.go
index 2ac817d..af37628 100644
--- a/test/codegen/switch.go
+++ b/test/codegen/switch.go
@@ -20,3 +20,55 @@
 		return -3
 	}
 }
+
+// use jump tables for 8+ int cases
+func square(x int) int {
+	// amd64:`JMP\s\(.*\)\(.*\)$`
+	// arm64:`MOVD\s\(R.*\)\(R.*<<3\)`,`JMP\s\(R.*\)$`
+	switch x {
+	case 1:
+		return 1
+	case 2:
+		return 4
+	case 3:
+		return 9
+	case 4:
+		return 16
+	case 5:
+		return 25
+	case 6:
+		return 36
+	case 7:
+		return 49
+	case 8:
+		return 64
+	default:
+		return x * x
+	}
+}
+
+// use jump tables for 8+ string lengths
+func length(x string) int {
+	// amd64:`JMP\s\(.*\)\(.*\)$`
+	// arm64:`MOVD\s\(R.*\)\(R.*<<3\)`,`JMP\s\(R.*\)$`
+	switch x {
+	case "a":
+		return 1
+	case "bb":
+		return 2
+	case "ccc":
+		return 3
+	case "dddd":
+		return 4
+	case "eeeee":
+		return 5
+	case "ffffff":
+		return 6
+	case "ggggggg":
+		return 7
+	case "hhhhhhhh":
+		return 8
+	default:
+		return len(x)
+	}
+}
diff --git a/test/codegen/zerosize.go b/test/codegen/zerosize.go
index 292c5a0..ecf3305 100644
--- a/test/codegen/zerosize.go
+++ b/test/codegen/zerosize.go
@@ -12,12 +12,12 @@
 
 func zeroSize() {
 	c := make(chan struct{})
-	// amd64:`MOVQ\t\$0, ""\.s\+56\(SP\)`
+	// amd64:`MOVQ\t\$0, command-line-arguments\.s\+56\(SP\)`
 	var s *int
 	// force s to be a stack object, also use some (fixed) stack space
 	g(&s, 1, 2, 3, 4, 5)
 
-	// amd64:`LEAQ\t""\..*\+55\(SP\)`
+	// amd64:`LEAQ\tcommand-line-arguments\..*\+55\(SP\)`
 	c <- struct{}{}
 }
 
diff --git a/test/const7.go b/test/const7.go
index 9ffd678..6acd7fd 100644
--- a/test/const7.go
+++ b/test/const7.go
@@ -24,7 +24,7 @@
 // which declares an untyped constant of the given length.
 // testProg compiles this package and checks for the absence or
 // presence of a constant literal error.
-func testProg(dir, name string, G_option, length int, ok bool) {
+func testProg(dir, name string, length int, ok bool) {
 	var buf bytes.Buffer
 
 	fmt.Fprintf(&buf,
@@ -37,7 +37,7 @@
 		log.Fatal(err)
 	}
 
-	cmd := exec.Command("go", "tool", "compile", fmt.Sprintf("-G=%d", G_option), filename)
+	cmd := exec.Command("go", "tool", "compile", "-p=p", filename)
 	cmd.Dir = dir
 	output, err := cmd.CombinedOutput()
 
@@ -70,8 +70,6 @@
 	defer os.RemoveAll(dir)
 
 	const limit = 10000 // compiler-internal constant length limit
-	testProg(dir, "x1", 0, limit, true)    // -G=0
-	testProg(dir, "x2", 0, limit+1, false) // -G=0
-	testProg(dir, "x1", 1, limit, true)    // -G=1 (new type checker)
-	testProg(dir, "x2", 1, limit+1, false) // -G=1 (new type checker)
+	testProg(dir, "x1", limit, true)
+	testProg(dir, "x2", limit+1, false)
 }
diff --git a/test/const8.go b/test/const8.go
new file mode 100644
index 0000000..9c04cc7
--- /dev/null
+++ b/test/const8.go
@@ -0,0 +1,36 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that identifiers in implicit (omitted) RHS
+// expressions of constant declarations are resolved
+// in the correct context; see issues #49157, #53585.
+
+package main
+
+const X = 2
+
+func main() {
+	const (
+		A    = iota // 0
+		iota = iota // 1
+		B           // 1 (iota is declared locally on prev. line)
+		C           // 1
+	)
+	if A != 0 || B != 1 || C != 1 {
+		println("got", A, B, C, "want 0 1 1")
+		panic("FAILED")
+	}
+
+	const (
+		X = X + X
+		Y
+		Z = iota
+	)
+	if X != 4 || Y != 8 || Z != 1 {
+		println("got", X, Y, Z, "want 4 8 1")
+		panic("FAILED")
+	}
+}
diff --git a/test/fixedbugs/bug121.go b/test/fixedbugs/bug121.go
index 22c7181..471c27e 100644
--- a/test/fixedbugs/bug121.go
+++ b/test/fixedbugs/bug121.go
@@ -9,7 +9,7 @@
 type T func()
 
 type I interface {
-	f, g ();	// ERROR "name list not allowed"
+	f, g ();  // ERROR "unexpected comma"
 }
 
 type J interface {
diff --git a/test/fixedbugs/bug150.go b/test/fixedbugs/bug150.go
index b565ef7..bb4b0d2 100644
--- a/test/fixedbugs/bug150.go
+++ b/test/fixedbugs/bug150.go
@@ -19,5 +19,5 @@
 }
 
 /*
-bugs/bug150.go:13: reorder2: too many funcation calls evaluating parameters
+bugs/bug150.go:13: reorder2: too many function calls evaluating parameters
 */
diff --git a/test/fixedbugs/bug222.dir/chanbug2.go b/test/fixedbugs/bug222.dir/chanbug2.go
index 109581d..b6c416f 100644
--- a/test/fixedbugs/bug222.dir/chanbug2.go
+++ b/test/fixedbugs/bug222.dir/chanbug2.go
@@ -3,4 +3,5 @@
 // license that can be found in the LICENSE file
 
 package Bar
-import _ "chanbug"
+
+import _ "./chanbug"
diff --git a/test/fixedbugs/bug302.dir/main.go b/test/fixedbugs/bug302.dir/main.go
deleted file mode 100644
index 52c054f..0000000
--- a/test/fixedbugs/bug302.dir/main.go
+++ /dev/null
@@ -1,12 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-// Check that the export information is correct in p.6.
-import _ "p"
-
-// Check that it's still correct in pp.a (which contains p.6).
-import _ "pp"
-
diff --git a/test/fixedbugs/bug302.dir/p.go b/test/fixedbugs/bug302.dir/p.go
deleted file mode 100644
index 0be521b..0000000
--- a/test/fixedbugs/bug302.dir/p.go
+++ /dev/null
@@ -1,1011 +0,0 @@
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-type T struct {
-	x1 int
-	x2 int
-	x3 int
-	x4 int
-	x5 int
-	x6 int
-	x7 int
-	x8 int
-	x9 int
-	x10 int
-	x11 int
-	x12 int
-	x13 int
-	x14 int
-	x15 int
-	x16 int
-	x17 int
-	x18 int
-	x19 int
-	x20 int
-	x21 int
-	x22 int
-	x23 int
-	x24 int
-	x25 int
-	x26 int
-	x27 int
-	x28 int
-	x29 int
-	x30 int
-	x31 int
-	x32 int
-	x33 int
-	x34 int
-	x35 int
-	x36 int
-	x37 int
-	x38 int
-	x39 int
-	x40 int
-	x41 int
-	x42 int
-	x43 int
-	x44 int
-	x45 int
-	x46 int
-	x47 int
-	x48 int
-	x49 int
-	x50 int
-	x51 int
-	x52 int
-	x53 int
-	x54 int
-	x55 int
-	x56 int
-	x57 int
-	x58 int
-	x59 int
-	x60 int
-	x61 int
-	x62 int
-	x63 int
-	x64 int
-	x65 int
-	x66 int
-	x67 int
-	x68 int
-	x69 int
-	x70 int
-	x71 int
-	x72 int
-	x73 int
-	x74 int
-	x75 int
-	x76 int
-	x77 int
-	x78 int
-	x79 int
-	x80 int
-	x81 int
-	x82 int
-	x83 int
-	x84 int
-	x85 int
-	x86 int
-	x87 int
-	x88 int
-	x89 int
-	x90 int
-	x91 int
-	x92 int
-	x93 int
-	x94 int
-	x95 int
-	x96 int
-	x97 int
-	x98 int
-	x99 int
-	x100 int
-	x101 int
-	x102 int
-	x103 int
-	x104 int
-	x105 int
-	x106 int
-	x107 int
-	x108 int
-	x109 int
-	x110 int
-	x111 int
-	x112 int
-	x113 int
-	x114 int
-	x115 int
-	x116 int
-	x117 int
-	x118 int
-	x119 int
-	x120 int
-	x121 int
-	x122 int
-	x123 int
-	x124 int
-	x125 int
-	x126 int
-	x127 int
-	x128 int
-	x129 int
-	x130 int
-	x131 int
-	x132 int
-	x133 int
-	x134 int
-	x135 int
-	x136 int
-	x137 int
-	x138 int
-	x139 int
-	x140 int
-	x141 int
-	x142 int
-	x143 int
-	x144 int
-	x145 int
-	x146 int
-	x147 int
-	x148 int
-	x149 int
-	x150 int
-	x151 int
-	x152 int
-	x153 int
-	x154 int
-	x155 int
-	x156 int
-	x157 int
-	x158 int
-	x159 int
-	x160 int
-	x161 int
-	x162 int
-	x163 int
-	x164 int
-	x165 int
-	x166 int
-	x167 int
-	x168 int
-	x169 int
-	x170 int
-	x171 int
-	x172 int
-	x173 int
-	x174 int
-	x175 int
-	x176 int
-	x177 int
-	x178 int
-	x179 int
-	x180 int
-	x181 int
-	x182 int
-	x183 int
-	x184 int
-	x185 int
-	x186 int
-	x187 int
-	x188 int
-	x189 int
-	x190 int
-	x191 int
-	x192 int
-	x193 int
-	x194 int
-	x195 int
-	x196 int
-	x197 int
-	x198 int
-	x199 int
-	x200 int
-	x201 int
-	x202 int
-	x203 int
-	x204 int
-	x205 int
-	x206 int
-	x207 int
-	x208 int
-	x209 int
-	x210 int
-	x211 int
-	x212 int
-	x213 int
-	x214 int
-	x215 int
-	x216 int
-	x217 int
-	x218 int
-	x219 int
-	x220 int
-	x221 int
-	x222 int
-	x223 int
-	x224 int
-	x225 int
-	x226 int
-	x227 int
-	x228 int
-	x229 int
-	x230 int
-	x231 int
-	x232 int
-	x233 int
-	x234 int
-	x235 int
-	x236 int
-	x237 int
-	x238 int
-	x239 int
-	x240 int
-	x241 int
-	x242 int
-	x243 int
-	x244 int
-	x245 int
-	x246 int
-	x247 int
-	x248 int
-	x249 int
-	x250 int
-	x251 int
-	x252 int
-	x253 int
-	x254 int
-	x255 int
-	x256 int
-	x257 int
-	x258 int
-	x259 int
-	x260 int
-	x261 int
-	x262 int
-	x263 int
-	x264 int
-	x265 int
-	x266 int
-	x267 int
-	x268 int
-	x269 int
-	x270 int
-	x271 int
-	x272 int
-	x273 int
-	x274 int
-	x275 int
-	x276 int
-	x277 int
-	x278 int
-	x279 int
-	x280 int
-	x281 int
-	x282 int
-	x283 int
-	x284 int
-	x285 int
-	x286 int
-	x287 int
-	x288 int
-	x289 int
-	x290 int
-	x291 int
-	x292 int
-	x293 int
-	x294 int
-	x295 int
-	x296 int
-	x297 int
-	x298 int
-	x299 int
-	x300 int
-	x301 int
-	x302 int
-	x303 int
-	x304 int
-	x305 int
-	x306 int
-	x307 int
-	x308 int
-	x309 int
-	x310 int
-	x311 int
-	x312 int
-	x313 int
-	x314 int
-	x315 int
-	x316 int
-	x317 int
-	x318 int
-	x319 int
-	x320 int
-	x321 int
-	x322 int
-	x323 int
-	x324 int
-	x325 int
-	x326 int
-	x327 int
-	x328 int
-	x329 int
-	x330 int
-	x331 int
-	x332 int
-	x333 int
-	x334 int
-	x335 int
-	x336 int
-	x337 int
-	x338 int
-	x339 int
-	x340 int
-	x341 int
-	x342 int
-	x343 int
-	x344 int
-	x345 int
-	x346 int
-	x347 int
-	x348 int
-	x349 int
-	x350 int
-	x351 int
-	x352 int
-	x353 int
-	x354 int
-	x355 int
-	x356 int
-	x357 int
-	x358 int
-	x359 int
-	x360 int
-	x361 int
-	x362 int
-	x363 int
-	x364 int
-	x365 int
-	x366 int
-	x367 int
-	x368 int
-	x369 int
-	x370 int
-	x371 int
-	x372 int
-	x373 int
-	x374 int
-	x375 int
-	x376 int
-	x377 int
-	x378 int
-	x379 int
-	x380 int
-	x381 int
-	x382 int
-	x383 int
-	x384 int
-	x385 int
-	x386 int
-	x387 int
-	x388 int
-	x389 int
-	x390 int
-	x391 int
-	x392 int
-	x393 int
-	x394 int
-	x395 int
-	x396 int
-	x397 int
-	x398 int
-	x399 int
-	x400 int
-	x401 int
-	x402 int
-	x403 int
-	x404 int
-	x405 int
-	x406 int
-	x407 int
-	x408 int
-	x409 int
-	x410 int
-	x411 int
-	x412 int
-	x413 int
-	x414 int
-	x415 int
-	x416 int
-	x417 int
-	x418 int
-	x419 int
-	x420 int
-	x421 int
-	x422 int
-	x423 int
-	x424 int
-	x425 int
-	x426 int
-	x427 int
-	x428 int
-	x429 int
-	x430 int
-	x431 int
-	x432 int
-	x433 int
-	x434 int
-	x435 int
-	x436 int
-	x437 int
-	x438 int
-	x439 int
-	x440 int
-	x441 int
-	x442 int
-	x443 int
-	x444 int
-	x445 int
-	x446 int
-	x447 int
-	x448 int
-	x449 int
-	x450 int
-	x451 int
-	x452 int
-	x453 int
-	x454 int
-	x455 int
-	x456 int
-	x457 int
-	x458 int
-	x459 int
-	x460 int
-	x461 int
-	x462 int
-	x463 int
-	x464 int
-	x465 int
-	x466 int
-	x467 int
-	x468 int
-	x469 int
-	x470 int
-	x471 int
-	x472 int
-	x473 int
-	x474 int
-	x475 int
-	x476 int
-	x477 int
-	x478 int
-	x479 int
-	x480 int
-	x481 int
-	x482 int
-	x483 int
-	x484 int
-	x485 int
-	x486 int
-	x487 int
-	x488 int
-	x489 int
-	x490 int
-	x491 int
-	x492 int
-	x493 int
-	x494 int
-	x495 int
-	x496 int
-	x497 int
-	x498 int
-	x499 int
-	x500 int
-	x501 int
-	x502 int
-	x503 int
-	x504 int
-	x505 int
-	x506 int
-	x507 int
-	x508 int
-	x509 int
-	x510 int
-	x511 int
-	x512 int
-	x513 int
-	x514 int
-	x515 int
-	x516 int
-	x517 int
-	x518 int
-	x519 int
-	x520 int
-	x521 int
-	x522 int
-	x523 int
-	x524 int
-	x525 int
-	x526 int
-	x527 int
-	x528 int
-	x529 int
-	x530 int
-	x531 int
-	x532 int
-	x533 int
-	x534 int
-	x535 int
-	x536 int
-	x537 int
-	x538 int
-	x539 int
-	x540 int
-	x541 int
-	x542 int
-	x543 int
-	x544 int
-	x545 int
-	x546 int
-	x547 int
-	x548 int
-	x549 int
-	x550 int
-	x551 int
-	x552 int
-	x553 int
-	x554 int
-	x555 int
-	x556 int
-	x557 int
-	x558 int
-	x559 int
-	x560 int
-	x561 int
-	x562 int
-	x563 int
-	x564 int
-	x565 int
-	x566 int
-	x567 int
-	x568 int
-	x569 int
-	x570 int
-	x571 int
-	x572 int
-	x573 int
-	x574 int
-	x575 int
-	x576 int
-	x577 int
-	x578 int
-	x579 int
-	x580 int
-	x581 int
-	x582 int
-	x583 int
-	x584 int
-	x585 int
-	x586 int
-	x587 int
-	x588 int
-	x589 int
-	x590 int
-	x591 int
-	x592 int
-	x593 int
-	x594 int
-	x595 int
-	x596 int
-	x597 int
-	x598 int
-	x599 int
-	x600 int
-	x601 int
-	x602 int
-	x603 int
-	x604 int
-	x605 int
-	x606 int
-	x607 int
-	x608 int
-	x609 int
-	x610 int
-	x611 int
-	x612 int
-	x613 int
-	x614 int
-	x615 int
-	x616 int
-	x617 int
-	x618 int
-	x619 int
-	x620 int
-	x621 int
-	x622 int
-	x623 int
-	x624 int
-	x625 int
-	x626 int
-	x627 int
-	x628 int
-	x629 int
-	x630 int
-	x631 int
-	x632 int
-	x633 int
-	x634 int
-	x635 int
-	x636 int
-	x637 int
-	x638 int
-	x639 int
-	x640 int
-	x641 int
-	x642 int
-	x643 int
-	x644 int
-	x645 int
-	x646 int
-	x647 int
-	x648 int
-	x649 int
-	x650 int
-	x651 int
-	x652 int
-	x653 int
-	x654 int
-	x655 int
-	x656 int
-	x657 int
-	x658 int
-	x659 int
-	x660 int
-	x661 int
-	x662 int
-	x663 int
-	x664 int
-	x665 int
-	x666 int
-	x667 int
-	x668 int
-	x669 int
-	x670 int
-	x671 int
-	x672 int
-	x673 int
-	x674 int
-	x675 int
-	x676 int
-	x677 int
-	x678 int
-	x679 int
-	x680 int
-	x681 int
-	x682 int
-	x683 int
-	x684 int
-	x685 int
-	x686 int
-	x687 int
-	x688 int
-	x689 int
-	x690 int
-	x691 int
-	x692 int
-	x693 int
-	x694 int
-	x695 int
-	x696 int
-	x697 int
-	x698 int
-	x699 int
-	x700 int
-	x701 int
-	x702 int
-	x703 int
-	x704 int
-	x705 int
-	x706 int
-	x707 int
-	x708 int
-	x709 int
-	x710 int
-	x711 int
-	x712 int
-	x713 int
-	x714 int
-	x715 int
-	x716 int
-	x717 int
-	x718 int
-	x719 int
-	x720 int
-	x721 int
-	x722 int
-	x723 int
-	x724 int
-	x725 int
-	x726 int
-	x727 int
-	x728 int
-	x729 int
-	x730 int
-	x731 int
-	x732 int
-	x733 int
-	x734 int
-	x735 int
-	x736 int
-	x737 int
-	x738 int
-	x739 int
-	x740 int
-	x741 int
-	x742 int
-	x743 int
-	x744 int
-	x745 int
-	x746 int
-	x747 int
-	x748 int
-	x749 int
-	x750 int
-	x751 int
-	x752 int
-	x753 int
-	x754 int
-	x755 int
-	x756 int
-	x757 int
-	x758 int
-	x759 int
-	x760 int
-	x761 int
-	x762 int
-	x763 int
-	x764 int
-	x765 int
-	x766 int
-	x767 int
-	x768 int
-	x769 int
-	x770 int
-	x771 int
-	x772 int
-	x773 int
-	x774 int
-	x775 int
-	x776 int
-	x777 int
-	x778 int
-	x779 int
-	x780 int
-	x781 int
-	x782 int
-	x783 int
-	x784 int
-	x785 int
-	x786 int
-	x787 int
-	x788 int
-	x789 int
-	x790 int
-	x791 int
-	x792 int
-	x793 int
-	x794 int
-	x795 int
-	x796 int
-	x797 int
-	x798 int
-	x799 int
-	x800 int
-	x801 int
-	x802 int
-	x803 int
-	x804 int
-	x805 int
-	x806 int
-	x807 int
-	x808 int
-	x809 int
-	x810 int
-	x811 int
-	x812 int
-	x813 int
-	x814 int
-	x815 int
-	x816 int
-	x817 int
-	x818 int
-	x819 int
-	x820 int
-	x821 int
-	x822 int
-	x823 int
-	x824 int
-	x825 int
-	x826 int
-	x827 int
-	x828 int
-	x829 int
-	x830 int
-	x831 int
-	x832 int
-	x833 int
-	x834 int
-	x835 int
-	x836 int
-	x837 int
-	x838 int
-	x839 int
-	x840 int
-	x841 int
-	x842 int
-	x843 int
-	x844 int
-	x845 int
-	x846 int
-	x847 int
-	x848 int
-	x849 int
-	x850 int
-	x851 int
-	x852 int
-	x853 int
-	x854 int
-	x855 int
-	x856 int
-	x857 int
-	x858 int
-	x859 int
-	x860 int
-	x861 int
-	x862 int
-	x863 int
-	x864 int
-	x865 int
-	x866 int
-	x867 int
-	x868 int
-	x869 int
-	x870 int
-	x871 int
-	x872 int
-	x873 int
-	x874 int
-	x875 int
-	x876 int
-	x877 int
-	x878 int
-	x879 int
-	x880 int
-	x881 int
-	x882 int
-	x883 int
-	x884 int
-	x885 int
-	x886 int
-	x887 int
-	x888 int
-	x889 int
-	x890 int
-	x891 int
-	x892 int
-	x893 int
-	x894 int
-	x895 int
-	x896 int
-	x897 int
-	x898 int
-	x899 int
-	x900 int
-	x901 int
-	x902 int
-	x903 int
-	x904 int
-	x905 int
-	x906 int
-	x907 int
-	x908 int
-	x909 int
-	x910 int
-	x911 int
-	x912 int
-	x913 int
-	x914 int
-	x915 int
-	x916 int
-	x917 int
-	x918 int
-	x919 int
-	x920 int
-	x921 int
-	x922 int
-	x923 int
-	x924 int
-	x925 int
-	x926 int
-	x927 int
-	x928 int
-	x929 int
-	x930 int
-	x931 int
-	x932 int
-	x933 int
-	x934 int
-	x935 int
-	x936 int
-	x937 int
-	x938 int
-	x939 int
-	x940 int
-	x941 int
-	x942 int
-	x943 int
-	x944 int
-	x945 int
-	x946 int
-	x947 int
-	x948 int
-	x949 int
-	x950 int
-	x951 int
-	x952 int
-	x953 int
-	x954 int
-	x955 int
-	x956 int
-	x957 int
-	x958 int
-	x959 int
-	x960 int
-	x961 int
-	x962 int
-	x963 int
-	x964 int
-	x965 int
-	x966 int
-	x967 int
-	x968 int
-	x969 int
-	x970 int
-	x971 int
-	x972 int
-	x973 int
-	x974 int
-	x975 int
-	x976 int
-	x977 int
-	x978 int
-	x979 int
-	x980 int
-	x981 int
-	x982 int
-	x983 int
-	x984 int
-	x985 int
-	x986 int
-	x987 int
-	x988 int
-	x989 int
-	x990 int
-	x991 int
-	x992 int
-	x993 int
-	x994 int
-	x995 int
-	x996 int
-	x997 int
-	x998 int
-	x999 int
-	x1000 int
-}
-
-func (t *T) M() {
-}
diff --git a/test/fixedbugs/bug302.go b/test/fixedbugs/bug302.go
deleted file mode 100644
index a2ab661..0000000
--- a/test/fixedbugs/bug302.go
+++ /dev/null
@@ -1,45 +0,0 @@
-// +build !nacl,!js,gc
-// run
-
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import (
-	"fmt"
-	"io/ioutil"
-	"os"
-	"os/exec"
-	"path/filepath"
-)
-
-var tmpDir string
-
-func main() {
-	fb, err := filepath.Abs("fixedbugs")
-	if err == nil {
-		tmpDir, err = ioutil.TempDir("", "bug302")
-	}
-	if err != nil {
-		fmt.Println(err)
-		os.Exit(1)
-	}
-	defer os.RemoveAll(tmpDir)
-
-	run("go", "tool", "compile", filepath.Join(fb, "bug302.dir", "p.go"))
-	run("go", "tool", "pack", "grc", "pp.a", "p.o")
-	run("go", "tool", "compile", "-I", ".", filepath.Join(fb, "bug302.dir", "main.go"))
-}
-
-func run(cmd string, args ...string) {
-	c := exec.Command(cmd, args...)
-	c.Dir = tmpDir
-	out, err := c.CombinedOutput()
-	if err != nil {
-		fmt.Println(string(out))
-		fmt.Println(err)
-		os.Exit(1)
-	}
-}
diff --git a/test/fixedbugs/bug345.go b/test/fixedbugs/bug345.go
index b974a61..d9349fb 100644
--- a/test/fixedbugs/bug345.go
+++ b/test/fixedbugs/bug345.go
@@ -1,10 +1,7 @@
-// +build !windows
-// errorcheckdir -n
+// errorcheckdir
 
 // Copyright 2011 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
 package ignored
-
-// TODO(ysmolsky): Fix golang.org/issue/25693 to enable on Windows.
diff --git a/test/fixedbugs/bug369.go b/test/fixedbugs/bug369.go
index 83f638d..5bababd 100644
--- a/test/fixedbugs/bug369.go
+++ b/test/fixedbugs/bug369.go
@@ -1,4 +1,4 @@
-// +build !nacl,!js,!windows,gc
+// +build !nacl,!js,gc
 // run
 
 // Copyright 2011 The Go Authors. All rights reserved.
@@ -29,10 +29,12 @@
 		return filepath.Join(tmpDir, name)
 	}
 
-	run("go", "tool", "compile", "-N", "-o", tmp("slow.o"), "pkg.go")
-	run("go", "tool", "compile", "-o", tmp("fast.o"), "pkg.go")
-	run("go", "tool", "compile", "-D", tmpDir, "-o", tmp("main.o"), "main.go")
-	run("go", "tool", "link", "-o", tmp("a.exe"), tmp("main.o"))
+	check(os.Mkdir(tmp("test"), 0777))
+
+	run("go", "tool", "compile", "-p=test/slow", "-N", "-o", tmp("test/slow.o"), "pkg.go")
+	run("go", "tool", "compile", "-p=test/fast", "-o", tmp("test/fast.o"), "pkg.go")
+	run("go", "tool", "compile", "-p=main", "-D", "test", "-I", tmpDir, "-o", tmp("main.o"), "main.go")
+	run("go", "tool", "link", "-L", tmpDir, "-o", tmp("a.exe"), tmp("main.o"))
 	run(tmp("a.exe"))
 }
 
diff --git a/test/fixedbugs/issue11053.dir/p_test.go b/test/fixedbugs/issue11053.dir/p_test.go
index 542c2a3..412352d 100644
--- a/test/fixedbugs/issue11053.dir/p_test.go
+++ b/test/fixedbugs/issue11053.dir/p_test.go
@@ -5,8 +5,8 @@
 package main
 
 import (
+	"./p"
 	"fmt"
-	"p"
 )
 
 type I interface {
diff --git a/test/fixedbugs/issue11771.go b/test/fixedbugs/issue11771.go
index c95dd6b..e5bed18 100644
--- a/test/fixedbugs/issue11771.go
+++ b/test/fixedbugs/issue11771.go
@@ -52,7 +52,7 @@
 		log.Fatal(err)
 	}
 
-	cmd := exec.Command("go", "tool", "compile", "x.go")
+	cmd := exec.Command("go", "tool", "compile", "-p=p", "x.go")
 	cmd.Dir = dir
 	output, err := cmd.CombinedOutput()
 	if err == nil {
diff --git a/test/fixedbugs/issue13319.go b/test/fixedbugs/issue13319.go
index c9b4896..7e1df3e 100644
--- a/test/fixedbugs/issue13319.go
+++ b/test/fixedbugs/issue13319.go
@@ -9,10 +9,10 @@
 func f(int, int) {
     switch x {
     case 1:
-        f(1, g()   // ERROR "expecting \)|expecting comma or \)"
+        f(1, g()   // ERROR "expecting \)|possibly missing comma or \)"
     case 2:
         f()
     case 3:
-        f(1, g()   // ERROR "expecting \)|expecting comma or \)"
+        f(1, g()   // ERROR "expecting \)|possibly missing comma or \)"
     }
 }
diff --git a/test/fixedbugs/issue13365.go b/test/fixedbugs/issue13365.go
index b22fa0f..02c6e03 100644
--- a/test/fixedbugs/issue13365.go
+++ b/test/fixedbugs/issue13365.go
@@ -16,7 +16,7 @@
 	_ = [...]int{-1: 0} // ERROR "index must be non\-negative integer constant|index expression is negative|must not be negative"
 
 	_ = []int{100: 0}
-	_ = [10]int{100: 0} // ERROR "array index 100 out of bounds|out of range"
+	_ = [10]int{100: 0} // ERROR "index 100 out of bounds|out of range"
 	_ = [...]int{100: 0}
 
 	_ = []int{t}    // ERROR "cannot use .* as (type )?int( in slice literal)?|incompatible type"
diff --git a/test/fixedbugs/issue14652.go b/test/fixedbugs/issue14652.go
index 6dd2fbf..586663b 100644
--- a/test/fixedbugs/issue14652.go
+++ b/test/fixedbugs/issue14652.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2016 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue19467.dir/z.go b/test/fixedbugs/issue19467.dir/z.go
index d381103..cfbf348 100644
--- a/test/fixedbugs/issue19467.dir/z.go
+++ b/test/fixedbugs/issue19467.dir/z.go
@@ -5,9 +5,10 @@
 package main
 
 import (
-	"./mysync"
 	"log"
 	"runtime"
+
+	"./mysync"
 )
 
 func main() {
@@ -23,8 +24,8 @@
 		}
 	}
 	expecting := []string{
-		"mysync.(*WaitGroup).Add",
-		"mysync.(*WaitGroup).Done",
+		"test/mysync.(*WaitGroup).Add",
+		"test/mysync.(*WaitGroup).Done",
 	}
 	for i := 0; i < 2; i++ {
 		if frames[i].Function != expecting[i] {
diff --git a/test/fixedbugs/issue20014.dir/main.go b/test/fixedbugs/issue20014.dir/main.go
index ac9957d..098ac6b 100644
--- a/test/fixedbugs/issue20014.dir/main.go
+++ b/test/fixedbugs/issue20014.dir/main.go
@@ -5,6 +5,7 @@
 package main
 
 import (
+	"sort"
 	"strings"
 
 	"issue20014.dir/a"
@@ -13,12 +14,17 @@
 func main() {
 	samePackage()
 	crossPackage()
+
 	// Print fields registered with field tracking.
+	var fields []string
 	for _, line := range strings.Split(fieldTrackInfo, "\n") {
-		if line == "" {
-			continue
+		if line != "" {
+			fields = append(fields, strings.Split(line, "\t")[0])
 		}
-		println(strings.Split(line, "\t")[0])
+	}
+	sort.Strings(fields) // for stable output, regardless of optimizations
+	for _, field := range fields {
+		println(field)
 	}
 }
 
diff --git a/test/fixedbugs/issue20014.out b/test/fixedbugs/issue20014.out
index 252e78d..3f79c77 100644
--- a/test/fixedbugs/issue20014.out
+++ b/test/fixedbugs/issue20014.out
@@ -2,5 +2,5 @@
 0
 0
 0
-main.T.X
 issue20014.dir/a.T.X
+main.T.X
diff --git a/test/fixedbugs/issue21317.go b/test/fixedbugs/issue21317.go
index 32b660c..fe51ef1 100644
--- a/test/fixedbugs/issue21317.go
+++ b/test/fixedbugs/issue21317.go
@@ -38,7 +38,7 @@
 	defer os.RemoveAll(f.Name())
 
 	// compile and test output
-	cmd := exec.Command("go", "tool", "compile", f.Name())
+	cmd := exec.Command("go", "tool", "compile", "-p=main", f.Name())
 	out, err := cmd.CombinedOutput()
 	if err == nil {
 		log.Fatalf("expected cmd/compile to fail")
diff --git a/test/fixedbugs/issue22660.go b/test/fixedbugs/issue22660.go
index 9ce9c4d..7f542c5 100644
--- a/test/fixedbugs/issue22660.go
+++ b/test/fixedbugs/issue22660.go
@@ -35,7 +35,7 @@
 		log.Fatal(err)
 	}
 
-	out, err := exec.Command("go", "tool", "compile", fmt.Sprintf("-trimpath=%s", path), f.Name()).CombinedOutput()
+	out, err := exec.Command("go", "tool", "compile", "-p=p", fmt.Sprintf("-trimpath=%s", path), f.Name()).CombinedOutput()
 	if err == nil {
 		log.Fatalf("expected compiling %s to fail", f.Name())
 	}
diff --git a/test/fixedbugs/issue22662b.go b/test/fixedbugs/issue22662b.go
index 8da1767..df4f284 100644
--- a/test/fixedbugs/issue22662b.go
+++ b/test/fixedbugs/issue22662b.go
@@ -48,7 +48,7 @@
 			log.Fatal(err)
 		}
 
-		out, err := exec.Command("go", "tool", "compile", f.Name()).CombinedOutput()
+		out, err := exec.Command("go", "tool", "compile", "-p=p", f.Name()).CombinedOutput()
 		if err == nil {
 			log.Fatalf("expected compiling\n---\n%s\n---\nto fail", test.src)
 		}
diff --git a/test/fixedbugs/issue22962.dir/b.go b/test/fixedbugs/issue22962.dir/b.go
index e1568c8..4937ef5 100644
--- a/test/fixedbugs/issue22962.dir/b.go
+++ b/test/fixedbugs/issue22962.dir/b.go
@@ -4,6 +4,6 @@
 
 package b
 
-import "a"
+import "./a"
 
 var V = func() { a.F() }
diff --git a/test/fixedbugs/issue23179.dir/b.go b/test/fixedbugs/issue23179.dir/b.go
index bec3d15..4bde498 100644
--- a/test/fixedbugs/issue23179.dir/b.go
+++ b/test/fixedbugs/issue23179.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 func G(x int) int {
 	return a.F(x, 1, false, a.Large{})
diff --git a/test/fixedbugs/issue23587.go b/test/fixedbugs/issue23587.go
index 2308992..9040767 100644
--- a/test/fixedbugs/issue23587.go
+++ b/test/fixedbugs/issue23587.go
@@ -7,7 +7,7 @@
 package p
 
 func _(x int) {
-	_ = ~x    // ERROR "unexpected ~"
+	_ = ~x    // unary ~ permitted but the type-checker will complain
 }
 
 func _(x int) {
diff --git a/test/fixedbugs/issue23814.go b/test/fixedbugs/issue23814.go
new file mode 100644
index 0000000..25ed232
--- /dev/null
+++ b/test/fixedbugs/issue23814.go
@@ -0,0 +1,61 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Examples from the language spec section on string conversions.
+
+package main
+
+func main() {
+	// 1
+	_ = string('a')  // "a"
+	_ = string(-1)   // "\ufffd" == "\xef\xbf\xbd"
+	_ = string(0xf8) // "\u00f8" == "ø" == "\xc3\xb8"
+
+	type myString string
+	_ = myString(0x65e5) // "\u65e5" == "日" == "\xe6\x97\xa5"
+
+	// 2
+	_ = string([]byte{'h', 'e', 'l', 'l', '\xc3', '\xb8'}) // "hellø"
+	_ = string([]byte{})                                   // ""
+	_ = string([]byte(nil))                                // ""
+
+	type bytes []byte
+	_ = string(bytes{'h', 'e', 'l', 'l', '\xc3', '\xb8'}) // "hellø"
+
+	type myByte byte
+	_ = string([]myByte{'w', 'o', 'r', 'l', 'd', '!'})     // "world!"
+	_ = myString([]myByte{'\xf0', '\x9f', '\x8c', '\x8d'}) // "🌍
+
+	// 3
+	_ = string([]rune{0x767d, 0x9d6c, 0x7fd4}) // "\u767d\u9d6c\u7fd4" == "白鵬翔"
+	_ = string([]rune{})                       // ""
+	_ = string([]rune(nil))                    // ""
+
+	type runes []rune
+	_ = string(runes{0x767d, 0x9d6c, 0x7fd4}) // "\u767d\u9d6c\u7fd4" == "白鵬翔"
+
+	type myRune rune
+	_ = string([]myRune{0x266b, 0x266c}) // "\u266b\u266c" == "♫♬"
+	_ = myString([]myRune{0x1f30e})      // "\U0001f30e" == "🌎
+
+	// 4
+	_ = []byte("hellø") // []byte{'h', 'e', 'l', 'l', '\xc3', '\xb8'}
+	_ = []byte("")      // []byte{}
+
+	_ = bytes("hellø") // []byte{'h', 'e', 'l', 'l', '\xc3', '\xb8'}
+
+	_ = []myByte("world!")      // []myByte{'w', 'o', 'r', 'l', 'd', '!'}
+	_ = []myByte(myString("🌏")) // []myByte{'\xf0', '\x9f', '\x8c', '\x8f'}
+
+	// 5
+	_ = []rune(myString("白鵬翔")) // []rune{0x767d, 0x9d6c, 0x7fd4}
+	_ = []rune("")              // []rune{}
+
+	_ = runes("白鵬翔") // []rune{0x767d, 0x9d6c, 0x7fd4}
+
+	_ = []myRune("♫♬")          // []myRune{0x266b, 0x266c}
+	_ = []myRune(myString("🌐")) // []myRune{0x1f310}
+}
diff --git a/test/fixedbugs/issue26411.go b/test/fixedbugs/issue26411.go
index 5f40bf2..eb17960 100644
--- a/test/fixedbugs/issue26411.go
+++ b/test/fixedbugs/issue26411.go
@@ -75,7 +75,7 @@
 			log.Printf("#%d: failed to create file %s", i, filename)
 			continue
 		}
-		output, _ := exec.Command("go", "tool", "compile", filename).CombinedOutput()
+		output, _ := exec.Command("go", "tool", "compile", "-p=p", filename).CombinedOutput()
 
 		// remove each matching error from the output
 		for _, err := range test.errors {
diff --git a/test/fixedbugs/issue27938.go b/test/fixedbugs/issue27938.go
index 2589e1e..5392c65 100644
--- a/test/fixedbugs/issue27938.go
+++ b/test/fixedbugs/issue27938.go
@@ -11,13 +11,13 @@
 package p
 
 type _ struct {
-	F sync.Mutex // ERROR "undefined: sync|expected package"
+	F sync.Mutex // ERROR "undefined: sync|expected package|reference to undefined name"
 }
 
 type _ struct {
-	sync.Mutex // ERROR "undefined: sync|expected package"
+	sync.Mutex // ERROR "undefined: sync|expected package|reference to undefined name"
 }
 
 type _ interface {
-	sync.Mutex // ERROR "undefined: sync|expected package|expected signature or type name"
+	sync.Mutex // ERROR "undefined: sync|expected package|expected signature or type name|reference to undefined name"
 }
diff --git a/test/fixedbugs/issue29919.dir/a.go b/test/fixedbugs/issue29919.dir/a.go
index 078f973..3b1dac4 100644
--- a/test/fixedbugs/issue29919.dir/a.go
+++ b/test/fixedbugs/issue29919.dir/a.go
@@ -51,14 +51,14 @@
 	}
 	iter := runtime.CallersFrames(pcs[:n])
 	f, more := iter.Next()
-	if f.Function != "a.f" || !strings.HasSuffix(f.File, "a.go") || f.Line != 22 {
+	if f.Function != "test/a.f" || !strings.HasSuffix(f.File, "a.go") || f.Line != 22 {
 		panic(fmt.Sprintf("bad f %v\n", f))
 	}
 	if !more {
 		panic("traceback truncated after f")
 	}
 	f, more = iter.Next()
-	if f.Function != "a.init" || !strings.HasSuffix(f.File, "a.go") || f.Line != 15 {
+	if f.Function != "test/a.init" || !strings.HasSuffix(f.File, "a.go") || f.Line != 15 {
 		panic(fmt.Sprintf("bad init %v\n", f))
 	}
 	if !more {
diff --git a/test/fixedbugs/issue30908.go b/test/fixedbugs/issue30908.go
index 60fbd11..27f070e 100644
--- a/test/fixedbugs/issue30908.go
+++ b/test/fixedbugs/issue30908.go
@@ -1,9 +1,10 @@
-// rundir -P -ldflags -strictdups=2 -w=0
+// rundir -ldflags -strictdups=2 -w=0
 
 // Copyright 2019 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
+//go:build !nacl && !js
 // +build !nacl,!js
 
 package ignored
diff --git a/test/fixedbugs/issue31252.dir/c.go b/test/fixedbugs/issue31252.dir/c.go
index 928c8ee..98ecf61 100644
--- a/test/fixedbugs/issue31252.dir/c.go
+++ b/test/fixedbugs/issue31252.dir/c.go
@@ -5,8 +5,8 @@
 package c
 
 import (
-	"a"
-	"b"
+	"./a"
+	"./b"
 )
 
 type HandlerFunc func(*string)
diff --git a/test/fixedbugs/issue31252.dir/main.go b/test/fixedbugs/issue31252.dir/main.go
index 25a7548..6c0c9ce 100644
--- a/test/fixedbugs/issue31252.dir/main.go
+++ b/test/fixedbugs/issue31252.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "c"
+import "./c"
 
 func main() {
 	c.RouterInit()
diff --git a/test/fixedbugs/issue31636.dir/main.go b/test/fixedbugs/issue31636.dir/main.go
index d8ae902..bbc5836 100644
--- a/test/fixedbugs/issue31636.dir/main.go
+++ b/test/fixedbugs/issue31636.dir/main.go
@@ -9,11 +9,11 @@
 // 1.13. For 1.14, we will move to a variant of lexicographic ordering
 // which will require a change to the test output of this test.
 import (
-	_ "c"
+	_ "./c"
 
-	_ "b"
+	_ "./b"
 
-	_ "a"
+	_ "./a"
 )
 
 func main() {
diff --git a/test/fixedbugs/issue31959.dir/main.go b/test/fixedbugs/issue31959.dir/main.go
index 895c4e5..6604e3a 100644
--- a/test/fixedbugs/issue31959.dir/main.go
+++ b/test/fixedbugs/issue31959.dir/main.go
@@ -12,7 +12,7 @@
 import (
 	"fmt"
 
-	"a"
+	"./a"
 )
 
 func main() {
diff --git a/test/fixedbugs/issue32595.dir/main.go b/test/fixedbugs/issue32595.dir/main.go
index 20472cd..979efe3 100644
--- a/test/fixedbugs/issue32595.dir/main.go
+++ b/test/fixedbugs/issue32595.dir/main.go
@@ -5,8 +5,8 @@
 package main
 
 import (
-	"a"
-	"b"
+	"./a"
+	"./b"
 )
 
 func main() {
diff --git a/test/fixedbugs/issue33013.dir/b.go b/test/fixedbugs/issue33013.dir/b.go
index 5694b58..a8f5cc0 100644
--- a/test/fixedbugs/issue33013.dir/b.go
+++ b/test/fixedbugs/issue33013.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 type Service uint64
 type ServiceDesc struct {
diff --git a/test/fixedbugs/issue33013.dir/c.go b/test/fixedbugs/issue33013.dir/c.go
index bfdc0b5..74425df 100644
--- a/test/fixedbugs/issue33013.dir/c.go
+++ b/test/fixedbugs/issue33013.dir/c.go
@@ -5,8 +5,8 @@
 package c
 
 import (
-	"a"
-	"b"
+	"./a"
+	"./b"
 )
 
 type BI interface {
diff --git a/test/fixedbugs/issue33013.dir/d.go b/test/fixedbugs/issue33013.dir/d.go
index f4fff4a..c70c664 100644
--- a/test/fixedbugs/issue33013.dir/d.go
+++ b/test/fixedbugs/issue33013.dir/d.go
@@ -5,8 +5,8 @@
 package d
 
 import (
-	"b"
-	"c"
+	"./b"
+	"./c"
 )
 
 var GA b.Service
diff --git a/test/fixedbugs/issue33020.dir/b.go b/test/fixedbugs/issue33020.dir/b.go
index 354ab3e..14a2a87 100644
--- a/test/fixedbugs/issue33020.dir/b.go
+++ b/test/fixedbugs/issue33020.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 var N n
 
diff --git a/test/fixedbugs/issue33158.dir/b.go b/test/fixedbugs/issue33158.dir/b.go
index a16f0da..4174b41 100644
--- a/test/fixedbugs/issue33158.dir/b.go
+++ b/test/fixedbugs/issue33158.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 func B() string {
 	return a.M()
diff --git a/test/fixedbugs/issue33219.dir/c.go b/test/fixedbugs/issue33219.dir/c.go
index ece48d7..a78fe69 100644
--- a/test/fixedbugs/issue33219.dir/c.go
+++ b/test/fixedbugs/issue33219.dir/c.go
@@ -5,8 +5,8 @@
 package c
 
 import (
-	"a"
-	"b"
+	"./a"
+	"./b"
 )
 
 type BI interface {
diff --git a/test/fixedbugs/issue33739.dir/b.go b/test/fixedbugs/issue33739.dir/b.go
index caca1ec..d22fe34 100644
--- a/test/fixedbugs/issue33739.dir/b.go
+++ b/test/fixedbugs/issue33739.dir/b.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 func main() {
 	a.F()()
diff --git a/test/fixedbugs/issue34503.dir/b.go b/test/fixedbugs/issue34503.dir/b.go
index 21bdfcc..7ea0251 100644
--- a/test/fixedbugs/issue34503.dir/b.go
+++ b/test/fixedbugs/issue34503.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 func Bfunc() {
 	a.Hook(101)
diff --git a/test/fixedbugs/issue34577.dir/b.go b/test/fixedbugs/issue34577.dir/b.go
index bbcd1af..c61d7da 100644
--- a/test/fixedbugs/issue34577.dir/b.go
+++ b/test/fixedbugs/issue34577.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 type B struct {
 	s string
diff --git a/test/fixedbugs/issue35586.dir/b.go b/test/fixedbugs/issue35586.dir/b.go
index e8b674f..e0abb99 100644
--- a/test/fixedbugs/issue35586.dir/b.go
+++ b/test/fixedbugs/issue35586.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 func F(addr string) (uint64, string) {
 	return a.D(addr, 32)
diff --git a/test/fixedbugs/issue36085.dir/b.go b/test/fixedbugs/issue36085.dir/b.go
index c5ee269..0ebfe9f 100644
--- a/test/fixedbugs/issue36085.dir/b.go
+++ b/test/fixedbugs/issue36085.dir/b.go
@@ -1,6 +1,6 @@
 package main
 
-import "a"
+import "./a"
 
 var w a.W
 var X interface{} = &w
diff --git a/test/fixedbugs/issue42401.dir/b.go b/test/fixedbugs/issue42401.dir/b.go
index a834f4e..fc675d8 100644
--- a/test/fixedbugs/issue42401.dir/b.go
+++ b/test/fixedbugs/issue42401.dir/b.go
@@ -5,11 +5,12 @@
 package main
 
 import (
-	"./a"
 	_ "unsafe"
+
+	"./a"
 )
 
-//go:linkname s a.s
+//go:linkname s test/a.s
 var s string
 
 func main() {
diff --git a/test/fixedbugs/issue44432.go b/test/fixedbugs/issue44432.go
index eec53f3..8628edd 100644
--- a/test/fixedbugs/issue44432.go
+++ b/test/fixedbugs/issue44432.go
@@ -1,4 +1,4 @@
-// errorcheck -G=0 -d=panic
+// errorcheck -d=panic
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue45503.dir/b.go b/test/fixedbugs/issue45503.dir/b.go
index df4877a..530c394 100644
--- a/test/fixedbugs/issue45503.dir/b.go
+++ b/test/fixedbugs/issue45503.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 func F() {
 	s := a.S{}
diff --git a/test/fixedbugs/issue47068.dir/main.go b/test/fixedbugs/issue47068.dir/main.go
index 16ef5b7..411e7db 100644
--- a/test/fixedbugs/issue47068.dir/main.go
+++ b/test/fixedbugs/issue47068.dir/main.go
@@ -5,8 +5,8 @@
 package main
 
 import (
-	"a"
-	"b"
+	"./a"
+	"./b"
 )
 
 func main() {
diff --git a/test/fixedbugs/issue47087.dir/main.go b/test/fixedbugs/issue47087.dir/main.go
index ccd0891..16c1cc6 100644
--- a/test/fixedbugs/issue47087.dir/main.go
+++ b/test/fixedbugs/issue47087.dir/main.go
@@ -5,8 +5,8 @@
 package main
 
 import (
-	"a"
-	"b"
+	"./a"
+	"./b"
 )
 
 func main() {
diff --git a/test/fixedbugs/issue48088.dir/b.go b/test/fixedbugs/issue48088.dir/b.go
index 221f2dd..bdb1bb5 100644
--- a/test/fixedbugs/issue48088.dir/b.go
+++ b/test/fixedbugs/issue48088.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 func F() {
 	a.F()
diff --git a/test/fixedbugs/issue48301.go b/test/fixedbugs/issue48301.go
index 1ff9ffb..94c9a5b 100644
--- a/test/fixedbugs/issue48301.go
+++ b/test/fixedbugs/issue48301.go
@@ -1,4 +1,4 @@
-// errorcheck -G=0
+// errorcheck
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue48471.go b/test/fixedbugs/issue48471.go
index eaf8a94..1b843c8 100644
--- a/test/fixedbugs/issue48471.go
+++ b/test/fixedbugs/issue48471.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3
+// errorcheck
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue49143.go b/test/fixedbugs/issue49143.go
index 87b4ff4..b83fbd7 100644
--- a/test/fixedbugs/issue49143.go
+++ b/test/fixedbugs/issue49143.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue49368.go b/test/fixedbugs/issue49368.go
index 4cbf351..2339048 100644
--- a/test/fixedbugs/issue49368.go
+++ b/test/fixedbugs/issue49368.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3 -lang=go1.17
+// errorcheck -lang=go1.17
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue49619.go b/test/fixedbugs/issue49619.go
index f34dfac..c9f3cbc 100644
--- a/test/fixedbugs/issue49619.go
+++ b/test/fixedbugs/issue49619.go
@@ -1,4 +1,4 @@
-// build -gcflags=-G=3
+// build
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue49665.go b/test/fixedbugs/issue49665.go
index 4a6593c..c6c22a1 100644
--- a/test/fixedbugs/issue49665.go
+++ b/test/fixedbugs/issue49665.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue49814.go b/test/fixedbugs/issue49814.go
index fd487d8..9b9695d 100644
--- a/test/fixedbugs/issue49814.go
+++ b/test/fixedbugs/issue49814.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3
+// errorcheck
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue50372.go b/test/fixedbugs/issue50372.go
index 30a171d..116d843 100644
--- a/test/fixedbugs/issue50372.go
+++ b/test/fixedbugs/issue50372.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3
+// errorcheck
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue50672.go b/test/fixedbugs/issue50672.go
new file mode 100644
index 0000000..178786a
--- /dev/null
+++ b/test/fixedbugs/issue50672.go
@@ -0,0 +1,105 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+var ok = false
+
+func f() func(int, int) int {
+	ok = true
+	return func(int, int) int { return 0 }
+}
+
+func g() (int, int) {
+	if !ok {
+		panic("FAIL")
+	}
+	return 0, 0
+}
+
+var _ = f()(g())
+
+func main() {
+	f1()
+	f2()
+	f3()
+	f4()
+}
+
+func f1() {
+	ok := false
+
+	f := func() func(int, int) {
+		ok = true
+		return func(int, int) {}
+	}
+	g := func() (int, int) {
+		if !ok {
+			panic("FAIL")
+		}
+		return 0, 0
+	}
+
+	f()(g())
+}
+
+type S struct{}
+
+func (S) f(int, int) {}
+
+func f2() {
+	ok := false
+
+	f := func() S {
+		ok = true
+		return S{}
+	}
+	g := func() (int, int) {
+		if !ok {
+			panic("FAIL")
+		}
+		return 0, 0
+	}
+
+	f().f(g())
+}
+
+func f3() {
+	ok := false
+
+	f := func() []func(int, int) {
+		ok = true
+		return []func(int, int){func(int, int) {}}
+	}
+	g := func() (int, int) {
+		if !ok {
+			panic("FAIL")
+		}
+		return 0, 0
+	}
+	f()[0](g())
+}
+
+type G[T any] struct{}
+
+func (G[T]) f(int, int) {}
+
+func f4() {
+	ok := false
+
+	f := func() G[int] {
+		ok = true
+		return G[int]{}
+	}
+	g := func() (int, int) {
+		if !ok {
+			panic("FAIL")
+		}
+		return 0, 0
+	}
+
+	f().f(g())
+}
diff --git a/test/fixedbugs/issue50788.dir/a.go b/test/fixedbugs/issue50788.dir/a.go
new file mode 100644
index 0000000..0f786d4
--- /dev/null
+++ b/test/fixedbugs/issue50788.dir/a.go
@@ -0,0 +1,9 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type T[P any] struct {
+	_ P
+}
diff --git a/test/fixedbugs/issue50788.dir/b.go b/test/fixedbugs/issue50788.dir/b.go
new file mode 100644
index 0000000..e17afc7
--- /dev/null
+++ b/test/fixedbugs/issue50788.dir/b.go
@@ -0,0 +1,9 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package b
+
+import "./a"
+
+type T a.T[T] // ERROR "invalid recursive type T\n.*T refers to\n.*a\.T refers to\n.*T"
diff --git a/test/fixedbugs/issue50788.go b/test/fixedbugs/issue50788.go
new file mode 100644
index 0000000..24d0eb0
--- /dev/null
+++ b/test/fixedbugs/issue50788.go
@@ -0,0 +1,7 @@
+// errorcheckdir
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/fixedbugs/issue51291.dir/a.go b/test/fixedbugs/issue51291.dir/a.go
new file mode 100644
index 0000000..21e2cd6
--- /dev/null
+++ b/test/fixedbugs/issue51291.dir/a.go
@@ -0,0 +1,9 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type TypeA string
+
+const StrA TypeA = "s"
diff --git a/test/fixedbugs/issue51291.dir/b.go b/test/fixedbugs/issue51291.dir/b.go
new file mode 100644
index 0000000..26b2c78
--- /dev/null
+++ b/test/fixedbugs/issue51291.dir/b.go
@@ -0,0 +1,11 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package b
+
+import "./a"
+
+type TypeB string
+
+const StrB TypeB = TypeB(a.StrA)
diff --git a/test/fixedbugs/issue51291.go b/test/fixedbugs/issue51291.go
new file mode 100644
index 0000000..9e7d4be
--- /dev/null
+++ b/test/fixedbugs/issue51291.go
@@ -0,0 +1,9 @@
+// compiledir
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
+
+// gofrontend crashed generating export data.
diff --git a/test/fixedbugs/issue51475.go b/test/fixedbugs/issue51475.go
new file mode 100644
index 0000000..46605fc
--- /dev/null
+++ b/test/fixedbugs/issue51475.go
@@ -0,0 +1,17 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gofrontend incorrectly gave an error for this code.
+
+package p
+
+type B bool
+
+func main() {
+	var v B = false
+	if (true && true) && v {
+	}
+}
diff --git a/test/fixedbugs/issue51531.go b/test/fixedbugs/issue51531.go
index 9a6a438..a296bbc 100644
--- a/test/fixedbugs/issue51531.go
+++ b/test/fixedbugs/issue51531.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3 -lang=go1.17
+// errorcheck -lang=go1.17
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/fixedbugs/issue51839.go b/test/fixedbugs/issue51839.go
new file mode 100644
index 0000000..c3c1891
--- /dev/null
+++ b/test/fixedbugs/issue51839.go
@@ -0,0 +1,22 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+	testRecover()
+
+}
+
+func testRecover() {
+	if false {
+		func() {
+			defer func() {
+				_ = recover()
+			}()
+		}()
+	}
+}
diff --git a/test/fixedbugs/issue52020.go b/test/fixedbugs/issue52020.go
new file mode 100644
index 0000000..0d18b1f
--- /dev/null
+++ b/test/fixedbugs/issue52020.go
@@ -0,0 +1,11 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+	var _ interface{} = struct{ _ [1]int8 }{}
+}
diff --git a/test/fixedbugs/issue52127.go b/test/fixedbugs/issue52127.go
new file mode 100644
index 0000000..7738c3f
--- /dev/null
+++ b/test/fixedbugs/issue52127.go
@@ -0,0 +1,62 @@
+// run
+//go:build !js
+// +build !js
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 52127: Too many syntax errors in many files can
+// cause deadlocks instead of displaying error messages
+// correctly.
+
+package main
+
+import (
+	"bytes"
+	"fmt"
+	"os"
+	"os/exec"
+	"path/filepath"
+)
+
+func main() {
+	dir, err := os.MkdirTemp("", "issue52127")
+	if err != nil {
+		panic(err)
+	}
+	defer os.RemoveAll(dir)
+
+	args := []string{"go", "build"}
+	write := func(prefix string, i int, data string) {
+		filename := filepath.Join(dir, fmt.Sprintf("%s%d.go", prefix, i))
+		if err := os.WriteFile(filename, []byte(data), 0o644); err != nil {
+			panic(err)
+		}
+		args = append(args, filename)
+	}
+
+	for i := 0; i < 100; i++ {
+		write("a", i, `package p
+`)
+	}
+	for i := 0; i < 100; i++ {
+		write("b", i, `package p
+var
+var
+var
+var
+var
+`)
+	}
+
+	cmd := exec.Command(args[0], args[1:]...)
+	output, err := cmd.CombinedOutput()
+	if err == nil {
+		panic("compile succeeded unexpectedly")
+	}
+	if !bytes.Contains(output, []byte("syntax error:")) {
+		panic(fmt.Sprintf(`missing "syntax error" in compiler output; got: 
+%s`, output))
+	}
+}
\ No newline at end of file
diff --git a/test/fixedbugs/issue52278.go b/test/fixedbugs/issue52278.go
new file mode 100644
index 0000000..147b653
--- /dev/null
+++ b/test/fixedbugs/issue52278.go
@@ -0,0 +1,12 @@
+// compile -d=ssa/check/on
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+_:
+_:
+}
diff --git a/test/fixedbugs/issue52279.dir/lib.go b/test/fixedbugs/issue52279.dir/lib.go
new file mode 100644
index 0000000..e20de30
--- /dev/null
+++ b/test/fixedbugs/issue52279.dir/lib.go
@@ -0,0 +1,23 @@
+package lib
+
+type FMap[K comparable, V comparable] map[K]V
+
+//go:noinline
+func (m FMap[K, V]) Flip() FMap[V, K] {
+	out := make(FMap[V, K])
+	return out
+}
+
+type MyType uint8
+
+const (
+	FIRST MyType = 0
+)
+
+var typeStrs = FMap[MyType, string]{
+	FIRST: "FIRST",
+}
+
+func (self MyType) String() string {
+	return typeStrs[self]
+}
diff --git a/test/fixedbugs/issue52279.dir/main.go b/test/fixedbugs/issue52279.dir/main.go
new file mode 100644
index 0000000..8c7e069
--- /dev/null
+++ b/test/fixedbugs/issue52279.dir/main.go
@@ -0,0 +1,5 @@
+package main
+
+import "./lib"
+
+func main() { lib.FIRST.String() }
diff --git a/test/fixedbugs/issue52279.go b/test/fixedbugs/issue52279.go
new file mode 100644
index 0000000..aefbe67
--- /dev/null
+++ b/test/fixedbugs/issue52279.go
@@ -0,0 +1,7 @@
+// rundir
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/fixedbugs/issue52438.go b/test/fixedbugs/issue52438.go
new file mode 100644
index 0000000..375e727
--- /dev/null
+++ b/test/fixedbugs/issue52438.go
@@ -0,0 +1,39 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+const c1 = iota
+const c2 = iota
+
+const c3 = 0 + iota<<8
+const c4 = 1 + iota<<8
+
+func main() {
+	if c1 != 0 {
+		panic(c1)
+	}
+	if c2 != 0 {
+		panic(c2)
+	}
+
+	if c3 != 0 {
+		panic(c3)
+	}
+	if c4 != 1 {
+		panic(c4)
+	}
+
+	const c5 = iota
+	const c6 = iota
+
+	if c5 != 0 {
+		panic(c5)
+	}
+	if c6 != 0 {
+		panic(c6)
+	}
+}
diff --git a/test/fixedbugs/issue52535.go b/test/fixedbugs/issue52535.go
new file mode 100644
index 0000000..6cb971f
--- /dev/null
+++ b/test/fixedbugs/issue52535.go
@@ -0,0 +1,16 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gofrontend crashed converting unnamed bool type to any.
+
+package p
+
+func F() {
+	m := make(map[int]int)
+	var ok any
+	_, ok = m[0]
+	_ = ok
+}
diff --git a/test/fixedbugs/issue52590.dir/a.go b/test/fixedbugs/issue52590.dir/a.go
new file mode 100644
index 0000000..20031e6
--- /dev/null
+++ b/test/fixedbugs/issue52590.dir/a.go
@@ -0,0 +1,68 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+import "unsafe"
+
+func Append() {
+	_ = append(appendArgs())
+}
+
+func Delete() {
+	delete(deleteArgs())
+}
+
+func Print() {
+	print(ints())
+}
+
+func Println() {
+	println(ints())
+}
+
+func Complex() {
+	_ = complex(float64s())
+}
+
+func Copy() {
+	copy(slices())
+}
+
+func UnsafeAdd() {
+	_ = unsafe.Add(unsafeAdd())
+}
+
+func UnsafeSlice() {
+	_ = unsafe.Slice(unsafeSlice())
+}
+
+func appendArgs() ([]int, int) {
+	return []int{}, 0
+}
+
+func deleteArgs() (map[int]int, int) {
+	return map[int]int{}, 0
+}
+
+func ints() (int, int) {
+	return 1, 1
+}
+
+func float64s() (float64, float64) {
+	return 0, 0
+}
+
+func slices() ([]int, []int) {
+	return []int{}, []int{}
+}
+
+func unsafeAdd() (unsafe.Pointer, int) {
+	return nil, 0
+}
+
+func unsafeSlice() (*byte, int) {
+	var p [10]byte
+	return &p[0], 0
+}
diff --git a/test/fixedbugs/issue52590.dir/b.go b/test/fixedbugs/issue52590.dir/b.go
new file mode 100644
index 0000000..264e8d1
--- /dev/null
+++ b/test/fixedbugs/issue52590.dir/b.go
@@ -0,0 +1,18 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package b
+
+import "./a"
+
+func f() {
+	a.Append()
+	a.Delete()
+	a.Print()
+	a.Println()
+	a.Complex()
+	a.Copy()
+	a.UnsafeAdd()
+	a.UnsafeSlice()
+}
diff --git a/test/fixedbugs/issue52590.go b/test/fixedbugs/issue52590.go
new file mode 100644
index 0000000..8bb5c3e
--- /dev/null
+++ b/test/fixedbugs/issue52590.go
@@ -0,0 +1,7 @@
+// compiledir
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/fixedbugs/issue52612.go b/test/fixedbugs/issue52612.go
new file mode 100644
index 0000000..d8be049
--- /dev/null
+++ b/test/fixedbugs/issue52612.go
@@ -0,0 +1,49 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"sync/atomic"
+	"unsafe"
+)
+
+var one interface{} = 1
+
+type eface struct {
+	typ  unsafe.Pointer
+	data unsafe.Pointer
+}
+
+func f(c chan struct{}) {
+	var x atomic.Value
+
+	go func() {
+		x.Swap(one) // writing using the old marker
+	}()
+	for i := 0; i < 100000; i++ {
+		v := x.Load() // reading using the new marker
+
+		p := (*eface)(unsafe.Pointer(&v)).typ
+		if uintptr(p) == ^uintptr(0) {
+			// We read the old marker, which the new reader
+			// doesn't know is a case where it should retry
+			// instead of returning it.
+			panic("bad typ field")
+		}
+	}
+	c <- struct{}{}
+}
+
+func main() {
+	c := make(chan struct{}, 10)
+	for i := 0; i < 10; i++ {
+		go f(c)
+	}
+	for i := 0; i < 10; i++ {
+		<-c
+	}
+}
diff --git a/test/fixedbugs/issue52673.go b/test/fixedbugs/issue52673.go
new file mode 100644
index 0000000..1540363
--- /dev/null
+++ b/test/fixedbugs/issue52673.go
@@ -0,0 +1,16 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+func f() {
+	var x string
+	func() [10][]bool {
+		return [10][]bool{
+			[]bool{bool(x < "")},
+			[]bool{}, []bool{}, []bool{}, []bool{}}
+	}()
+}
diff --git a/test/fixedbugs/issue52701.go b/test/fixedbugs/issue52701.go
new file mode 100644
index 0000000..f1de16c
--- /dev/null
+++ b/test/fixedbugs/issue52701.go
@@ -0,0 +1,16 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type T1 struct{}
+type T2 struct{}
+
+func f() {
+	switch (T1{}) {
+	case T1(T2{}):
+	}
+}
diff --git a/test/fixedbugs/issue52748.go b/test/fixedbugs/issue52748.go
new file mode 100644
index 0000000..42973c0
--- /dev/null
+++ b/test/fixedbugs/issue52748.go
@@ -0,0 +1,13 @@
+// errorcheck
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+import "unsafe"
+
+type S[T any] struct{}
+
+const c = unsafe.Sizeof(S[[c]byte]{}) // ERROR "initialization loop"
diff --git a/test/fixedbugs/issue52788.go b/test/fixedbugs/issue52788.go
new file mode 100644
index 0000000..b0d7d14
--- /dev/null
+++ b/test/fixedbugs/issue52788.go
@@ -0,0 +1,27 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 52788: miscompilation for boolean comparison on ARM64.
+
+package main
+
+import (
+	"fmt"
+	"reflect"
+)
+
+func f(next func() bool) {
+	for b := next(); b; b = next() {
+		fmt.Printf("next() returned %v\n", b)
+	}
+}
+
+func main() {
+	next := reflect.MakeFunc(reflect.TypeOf((func() bool)(nil)), func(_ []reflect.Value) []reflect.Value {
+		return []reflect.Value{reflect.ValueOf(false)}
+	})
+	reflect.ValueOf(f).Call([]reflect.Value{next})
+}
diff --git a/test/fixedbugs/issue52788a.go b/test/fixedbugs/issue52788a.go
new file mode 100644
index 0000000..38b8416
--- /dev/null
+++ b/test/fixedbugs/issue52788a.go
@@ -0,0 +1,29 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 52788: miscompilation for boolean ops on ARM64.
+
+package main
+
+import (
+	"fmt"
+	"reflect"
+	"os"
+)
+
+func f(next func() bool) {
+	for b := next(); b; b = next() {
+		fmt.Printf("%v\n", b)
+		os.Exit(0)
+	}
+}
+
+func main() {
+	next := reflect.MakeFunc(reflect.TypeOf((func() bool)(nil)), func(_ []reflect.Value) []reflect.Value {
+		return []reflect.Value{reflect.ValueOf(true)}
+	})
+	reflect.ValueOf(f).Call([]reflect.Value{next})
+}
diff --git a/test/fixedbugs/issue52788a.out b/test/fixedbugs/issue52788a.out
new file mode 100644
index 0000000..27ba77d
--- /dev/null
+++ b/test/fixedbugs/issue52788a.out
@@ -0,0 +1 @@
+true
diff --git a/test/fixedbugs/issue52841.go b/test/fixedbugs/issue52841.go
new file mode 100644
index 0000000..c8632ae
--- /dev/null
+++ b/test/fixedbugs/issue52841.go
@@ -0,0 +1,30 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 52841: gofrontend crashed writing export data
+
+package p
+
+func F() {
+	x := ([17][1]interface {
+		Method9()
+		Method10()
+	}{
+		func() (V47 [1]interface {
+			Method9()
+			Method10()
+		}) {
+			return
+		}(),
+		func(V48 string) (V49 [1]interface {
+			Method9()
+			Method10()
+		}) {
+			return
+		}("440"),
+	})
+	_ = x
+}
diff --git a/test/fixedbugs/issue52846.go b/test/fixedbugs/issue52846.go
new file mode 100644
index 0000000..747fc88
--- /dev/null
+++ b/test/fixedbugs/issue52846.go
@@ -0,0 +1,17 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 52846: gofrontend crashed with alias as map key type
+
+package p
+
+type S struct {
+	F string
+}
+
+type A = S
+
+var M = map[A]int{A{""}: 0}
diff --git a/test/fixedbugs/issue52856.dir/a.go b/test/fixedbugs/issue52856.dir/a.go
new file mode 100644
index 0000000..36af7e0
--- /dev/null
+++ b/test/fixedbugs/issue52856.dir/a.go
@@ -0,0 +1,9 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+func F() any {
+	return struct{ int }{0}
+}
diff --git a/test/fixedbugs/issue52856.dir/main.go b/test/fixedbugs/issue52856.dir/main.go
new file mode 100644
index 0000000..732368d
--- /dev/null
+++ b/test/fixedbugs/issue52856.dir/main.go
@@ -0,0 +1,19 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./a"
+
+func F() any {
+	return struct{ int }{0}
+}
+
+func main() {
+	_, ok1 := F().(struct{ int })
+	_, ok2 := a.F().(struct{ int })
+	if !ok1 || ok2 {
+		panic(0)
+	}
+}
diff --git a/test/fixedbugs/issue52856.go b/test/fixedbugs/issue52856.go
new file mode 100644
index 0000000..1991aaa
--- /dev/null
+++ b/test/fixedbugs/issue52856.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that an embedded unexported type has a different name in
+// different packages.
+
+package ignored
diff --git a/test/fixedbugs/issue52862.dir/a.go b/test/fixedbugs/issue52862.dir/a.go
new file mode 100644
index 0000000..ef4ce20
--- /dev/null
+++ b/test/fixedbugs/issue52862.dir/a.go
@@ -0,0 +1,9 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+func F() complex128 {
+	return 0+0i
+}
diff --git a/test/fixedbugs/issue52862.dir/b.go b/test/fixedbugs/issue52862.dir/b.go
new file mode 100644
index 0000000..739af66
--- /dev/null
+++ b/test/fixedbugs/issue52862.dir/b.go
@@ -0,0 +1,11 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package b
+
+import "./a"
+
+func F() complex128 {
+	return a.F()
+}
diff --git a/test/fixedbugs/issue52862.go b/test/fixedbugs/issue52862.go
new file mode 100644
index 0000000..322d5f6
--- /dev/null
+++ b/test/fixedbugs/issue52862.go
@@ -0,0 +1,9 @@
+// compiledir
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gofrontend crash importing a complex zero value.
+
+package ignored
diff --git a/test/fixedbugs/issue52870.go b/test/fixedbugs/issue52870.go
new file mode 100644
index 0000000..a1c441a
--- /dev/null
+++ b/test/fixedbugs/issue52870.go
@@ -0,0 +1,27 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 52870: gofrontend gave incorrect error when incorrectly
+// compiling ambiguous promoted method.
+
+package p
+
+type S1 struct {
+	*S2
+}
+
+type S2 struct {
+	T3
+	T4
+}
+
+type T3 int32
+
+func (T3) M() {}
+
+type T4 int32
+
+func (T4) M() {}
diff --git a/test/fixedbugs/issue52871.go b/test/fixedbugs/issue52871.go
new file mode 100644
index 0000000..d3731a1
--- /dev/null
+++ b/test/fixedbugs/issue52871.go
@@ -0,0 +1,17 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gofrontend crashed compiling this code.
+
+package p
+
+type S struct {}
+
+func (s *S) test(_ string) {}
+
+var T = [1]func(*S, string) {
+	(*S).test,
+}
diff --git a/test/fixedbugs/issue52907.go b/test/fixedbugs/issue52907.go
new file mode 100644
index 0000000..f54b204
--- /dev/null
+++ b/test/fixedbugs/issue52907.go
@@ -0,0 +1,26 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func f[T int](t T) {
+	for true {
+		func() {
+			t = func() T { return t }()
+		}()
+	}
+}
+
+func g[T int](g T) {
+	for true {
+		_ = func() T { return func(int) T { return g }(0) }()
+	}
+}
+
+func main() {
+	f(0)
+	g(0)
+}
diff --git a/test/fixedbugs/issue52953.go b/test/fixedbugs/issue52953.go
new file mode 100644
index 0000000..2085e4e
--- /dev/null
+++ b/test/fixedbugs/issue52953.go
@@ -0,0 +1,29 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 52953: miscompilation for composite literal assignment
+// when LHS is address-taken.
+
+package main
+
+type T struct {
+	Field1 bool
+}
+
+func main() {
+	var ret T
+	ret.Field1 = true
+	var v *bool = &ret.Field1
+	ret = T{Field1: *v}
+	check(ret.Field1)
+}
+
+//go:noinline
+func check(b bool) {
+	if !b {
+		panic("FAIL")
+	}
+}
diff --git a/test/fixedbugs/issue53018.go b/test/fixedbugs/issue53018.go
new file mode 100644
index 0000000..439d9d5
--- /dev/null
+++ b/test/fixedbugs/issue53018.go
@@ -0,0 +1,30 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+var V []int
+
+func f(i int, c chan int) int {
+	arr := []int{0, 1}
+	for range c {
+		for a2 := range arr {
+			var a []int
+			V = V[:1/a2]
+			a[i] = 0
+		}
+		return func() int {
+			arr = []int{}
+			return func() int {
+				return func() int {
+					return func() int { return 4 }()
+				}()
+			}()
+		}()
+	}
+
+	return 0
+}
diff --git a/test/fixedbugs/issue53137.go b/test/fixedbugs/issue53137.go
new file mode 100644
index 0000000..a0e6721
--- /dev/null
+++ b/test/fixedbugs/issue53137.go
@@ -0,0 +1,32 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"unsafe"
+)
+
+type Embedded struct {
+	B int
+}
+
+type S[K any] struct {
+	A K
+	Embedded
+}
+
+func showOffsets[K any](d *S[K]) {
+	o1 := unsafe.Offsetof(d.B)
+	o2 := unsafe.Offsetof(d.Embedded)
+	if o1 != o2 {
+		panic("offset mismatch")
+	}
+}
+
+func main() {
+	showOffsets(new(S[int]))
+}
diff --git a/test/fixedbugs/issue53309.go b/test/fixedbugs/issue53309.go
new file mode 100644
index 0000000..2b752fe
--- /dev/null
+++ b/test/fixedbugs/issue53309.go
@@ -0,0 +1,42 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type TaskInput interface {
+	deps() []*taskDefinition
+}
+
+type Value[T any] interface {
+	metaValue
+}
+
+type metaValue interface {
+	TaskInput
+}
+
+type taskDefinition struct {
+}
+
+type taskResult struct {
+	task *taskDefinition
+}
+
+func (tr *taskResult) deps() []*taskDefinition {
+	return nil
+}
+
+func use[T any](v Value[T]) {
+	_, ok := v.(*taskResult)
+	if !ok {
+		panic("output must be *taskResult")
+	}
+}
+
+func main() {
+	tr := &taskResult{&taskDefinition{}}
+	use(Value[string](tr))
+}
diff --git a/test/fixedbugs/issue53454.go b/test/fixedbugs/issue53454.go
new file mode 100644
index 0000000..8b16d81
--- /dev/null
+++ b/test/fixedbugs/issue53454.go
@@ -0,0 +1,89 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type T1 struct {
+	A T5
+	B T2
+	C T7
+	D T4
+}
+
+type T2 struct {
+	T3
+	A float64
+	E float64
+	C float64
+}
+
+type T3 struct {
+	F float64
+	G float64
+	H float64
+	I float64
+	J float64
+	K float64
+	L float64
+}
+
+type T4 struct {
+	M float64
+	N float64
+	O float64
+	P float64
+}
+
+type T5 struct {
+	Q float64
+	R float64
+	S float64
+	T float64
+	U float64
+	V float64
+}
+
+type T6 struct {
+	T9
+	C T10
+}
+
+type T7 struct {
+	T10
+	T11
+}
+
+type T8 struct {
+	T9
+	C T7
+}
+
+type T9 struct {
+	A T5
+	B T3
+	D T4
+}
+
+type T10 struct {
+	W float64
+}
+
+type T11 struct {
+	X float64
+	Y float64
+}
+
+func MainTest(x T1, y T8, z T6) float64 {
+	return Test(x.B, x.A, x.D, x.C, y.B, y.A, y.D, y.C, z.B, z.A, z.D,
+		T7{
+			T10: T10{
+				W: z.C.W,
+			},
+			T11: T11{},
+		},
+	)
+}
+func Test(a T2, b T5, c T4, d T7, e T3, f T5, g T4, h T7, i T3, j T5, k T4, l T7) float64
diff --git a/test/fixedbugs/issue53600.go b/test/fixedbugs/issue53600.go
new file mode 100644
index 0000000..ead40b5
--- /dev/null
+++ b/test/fixedbugs/issue53600.go
@@ -0,0 +1,53 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "math"
+
+func main() {
+	f()
+	g()
+	h()
+	j(math.MinInt64)
+}
+func f() {
+	for i := int64(math.MaxInt64); i <= math.MaxInt64; i++ {
+		if i < 0 {
+			println("done")
+			return
+		}
+		println(i, i < 0)
+	}
+}
+func g() {
+	for i := int64(math.MaxInt64) - 1; i <= math.MaxInt64; i++ {
+		if i < 0 {
+			println("done")
+			return
+		}
+		println(i, i < 0)
+	}
+}
+func h() {
+	for i := int64(math.MaxInt64) - 2; i <= math.MaxInt64; i += 2 {
+		if i < 0 {
+			println("done")
+			return
+		}
+		println(i, i < 0)
+	}
+}
+
+//go:noinline
+func j(i int64) {
+	for j := int64(math.MaxInt64); j <= i-1; j++ {
+		if j < 0 {
+			break
+		}
+		println(j)
+	}
+}
diff --git a/test/fixedbugs/issue53600.out b/test/fixedbugs/issue53600.out
new file mode 100644
index 0000000..577b50f
--- /dev/null
+++ b/test/fixedbugs/issue53600.out
@@ -0,0 +1,9 @@
+9223372036854775807 false
+done
+9223372036854775806 false
+9223372036854775807 false
+done
+9223372036854775805 false
+9223372036854775807 false
+done
+9223372036854775807
diff --git a/test/fixedbugs/issue53619.go b/test/fixedbugs/issue53619.go
new file mode 100644
index 0000000..2b6d047
--- /dev/null
+++ b/test/fixedbugs/issue53619.go
@@ -0,0 +1,21 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+var c = b
+var d = a
+
+var a, b any = any(nil).(bool)
+
+func main() {
+	if c != false {
+		panic(c)
+	}
+	if d != false {
+		panic(d)
+	}
+}
diff --git a/test/fixedbugs/issue53635.go b/test/fixedbugs/issue53635.go
new file mode 100644
index 0000000..bea5493
--- /dev/null
+++ b/test/fixedbugs/issue53635.go
@@ -0,0 +1,31 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+	f[int]()
+}
+
+func f[T any]() {
+	switch []T(nil) {
+	case nil:
+	default:
+		panic("FAIL")
+	}
+
+	switch (func() T)(nil) {
+	case nil:
+	default:
+		panic("FAIL")
+	}
+
+	switch (map[int]T)(nil) {
+	case nil:
+	default:
+		panic("FAIL")
+	}
+}
diff --git a/test/fixedbugs/issue53653.go b/test/fixedbugs/issue53653.go
new file mode 100644
index 0000000..555f7da
--- /dev/null
+++ b/test/fixedbugs/issue53653.go
@@ -0,0 +1,42 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "math"
+
+func main() {
+	f()
+	g()
+	h()
+}
+func f() {
+	for i := int64(math.MinInt64); i >= math.MinInt64; i-- {
+		if i > 0 {
+			println("done")
+			return
+		}
+		println(i, i > 0)
+	}
+}
+func g() {
+	for i := int64(math.MinInt64) + 1; i >= math.MinInt64; i-- {
+		if i > 0 {
+			println("done")
+			return
+		}
+		println(i, i > 0)
+	}
+}
+func h() {
+	for i := int64(math.MinInt64) + 2; i >= math.MinInt64; i -= 2 {
+		if i > 0 {
+			println("done")
+			return
+		}
+		println(i, i > 0)
+	}
+}
diff --git a/test/fixedbugs/issue53653.out b/test/fixedbugs/issue53653.out
new file mode 100644
index 0000000..f699392
--- /dev/null
+++ b/test/fixedbugs/issue53653.out
@@ -0,0 +1,8 @@
+-9223372036854775808 false
+done
+-9223372036854775807 false
+-9223372036854775808 false
+done
+-9223372036854775806 false
+-9223372036854775808 false
+done
diff --git a/test/fixedbugs/issue5910.dir/main.go b/test/fixedbugs/issue5910.dir/main.go
index c5d42ea..80ddfbb 100644
--- a/test/fixedbugs/issue5910.dir/main.go
+++ b/test/fixedbugs/issue5910.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 func main() {
 	f := new(a.Future)
diff --git a/test/fixedbugs/issue5957.dir/c.go b/test/fixedbugs/issue5957.dir/c.go
index d115eac..821b37e 100644
--- a/test/fixedbugs/issue5957.dir/c.go
+++ b/test/fixedbugs/issue5957.dir/c.go
@@ -1,9 +1,9 @@
 package p
 
 import (
-	"./a" // ERROR "imported and not used: \x22a\x22 as surprise|imported and not used: surprise"
-	"./b" // ERROR "imported and not used: \x22b\x22 as surprise2|imported and not used: surprise2"
-	b "./b" // ERROR "imported and not used: \x22b\x22$|imported and not used: surprise2"
+	"./a" // ERROR "imported and not used: \x22test/a\x22 as surprise|imported and not used: surprise"
+	"./b" // ERROR "imported and not used: \x22test/b\x22 as surprise2|imported and not used: surprise2"
+	b "./b" // ERROR "imported and not used: \x22test/b\x22$|imported and not used: surprise2"
 	foo "math" // ERROR "imported and not used: \x22math\x22 as foo|imported and not used: math"
 	"fmt" // actually used
 	"strings" // ERROR "imported and not used: \x22strings\x22|imported and not used: strings"
diff --git a/test/fixedbugs/issue7648.dir/b.go b/test/fixedbugs/issue7648.dir/b.go
index b9223ed..7b33602 100644
--- a/test/fixedbugs/issue7648.dir/b.go
+++ b/test/fixedbugs/issue7648.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 func f() {
 	println(a.A)
diff --git a/test/fixedbugs/issue8060.dir/b.go b/test/fixedbugs/issue8060.dir/b.go
index 85fb6ec..fc7eb25 100644
--- a/test/fixedbugs/issue8060.dir/b.go
+++ b/test/fixedbugs/issue8060.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 var X = a.A
 
diff --git a/test/fixedbugs/issue9355.go b/test/fixedbugs/issue9355.go
index 319a2a9..1c3999c 100644
--- a/test/fixedbugs/issue9355.go
+++ b/test/fixedbugs/issue9355.go
@@ -27,15 +27,15 @@
 	}
 	f.Close()
 
-	out := run("go", "tool", "compile", "-o", f.Name(), "-S", "a.go")
+	out := run("go", "tool", "compile", "-p=p", "-o", f.Name(), "-S", "a.go")
 	os.Remove(f.Name())
 
 	// 6g/8g print the offset as dec, but 5g/9g print the offset as hex.
 	patterns := []string{
-		`rel 0\+\d t=1 \"\"\.x\+8\r?\n`,       // y = &x.b
-		`rel 0\+\d t=1 \"\"\.x\+(28|1c)\r?\n`, // z = &x.d.q
-		`rel 0\+\d t=1 \"\"\.b\+5\r?\n`,       // c = &b[5]
-		`rel 0\+\d t=1 \"\"\.x\+(88|58)\r?\n`, // w = &x.f[3].r
+		`rel 0\+\d t=1 p\.x\+8\r?\n`,       // y = &x.b
+		`rel 0\+\d t=1 p\.x\+(28|1c)\r?\n`, // z = &x.d.q
+		`rel 0\+\d t=1 p\.b\+5\r?\n`,       // c = &b[5]
+		`rel 0\+\d t=1 p\.x\+(88|58)\r?\n`, // w = &x.f[3].r
 	}
 	for _, p := range patterns {
 		if ok, err := regexp.Match(p, out); !ok || err != nil {
diff --git a/test/heapsampling.go b/test/heapsampling.go
index cc72832..741db74 100644
--- a/test/heapsampling.go
+++ b/test/heapsampling.go
@@ -45,7 +45,7 @@
 // the testcase allows for a 10% margin of error, but only fails if it
 // consistently fails across three experiments, avoiding flakes.
 func testInterleavedAllocations() error {
-	const iters = 100000
+	const iters = 50000
 	// Sizes of the allocations performed by each experiment.
 	frames := []string{"main.allocInterleaved1", "main.allocInterleaved2", "main.allocInterleaved3"}
 
@@ -79,6 +79,9 @@
 		a16k = new([16 * 1024]byte)
 		a256 = new([256]byte)
 		// Test verification depends on these lines being contiguous.
+
+		// Slow down the allocation rate to avoid #52433.
+		runtime.Gosched()
 	}
 }
 
@@ -101,7 +104,7 @@
 // the testcase allows for a 10% margin of error, but only fails if it
 // consistently fails across three experiments, avoiding flakes.
 func testSmallAllocations() error {
-	const iters = 100000
+	const iters = 50000
 	// Sizes of the allocations performed by each experiment.
 	sizes := []int64{1024, 512, 256}
 	frames := []string{"main.allocSmall1", "main.allocSmall2", "main.allocSmall3"}
@@ -130,6 +133,9 @@
 		a1k = new([1024]byte)
 		a512 = new([512]byte)
 		a256 = new([256]byte)
+
+		// Slow down the allocation rate to avoid #52433.
+		runtime.Gosched()
 	}
 }
 
diff --git a/test/inline.go b/test/inline.go
index 2780e10..400898b 100644
--- a/test/inline.go
+++ b/test/inline.go
@@ -160,6 +160,51 @@
 	}
 }
 
+// Test that switches on constant things, with constant cases, only cost anything for
+// the case that matches. See issue 50253.
+func switchConst1(p func(string)) { // ERROR "can inline switchConst" "p does not escape"
+	const c = 1
+	switch c {
+	case 0:
+		p("zero")
+	case 1:
+		p("one")
+	case 2:
+		p("two")
+	default:
+		p("other")
+	}
+}
+
+func switchConst2() string { // ERROR "can inline switchConst2"
+	switch runtime.GOOS {
+	case "linux":
+		return "Leenooks"
+	case "windows":
+		return "Windoze"
+	case "darwin":
+		return "MackBone"
+	case "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100":
+		return "Numbers"
+	default:
+		return "oh nose!"
+	}
+}
+func switchConst3() string { // ERROR "can inline switchConst3"
+	switch runtime.GOOS {
+	case "Linux":
+		panic("Linux")
+	case "Windows":
+		panic("Windows")
+	case "Darwin":
+		panic("Darwin")
+	case "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46", "47", "48", "49", "50", "51", "52", "53", "54", "55", "56", "57", "58", "59", "60", "61", "62", "63", "64", "65", "66", "67", "68", "69", "70", "71", "72", "73", "74", "75", "76", "77", "78", "79", "80", "81", "82", "83", "84", "85", "86", "87", "88", "89", "90", "91", "92", "93", "94", "95", "96", "97", "98", "99", "100":
+		panic("Numbers")
+	default:
+		return "oh nose!"
+	}
+}
+
 func inlineRangeIntoMe(data []int) { // ERROR "can inline inlineRangeIntoMe" "data does not escape"
 	rangeFunc(data, 12) // ERROR "inlining call to rangeFunc"
 }
@@ -303,3 +348,31 @@
 func conv1(v uint64) uint64 { // ERROR "can inline conv1"
 	return uint64(uint64(uint64(uint64(uint64(uint64(uint64(uint64(uint64(uint64(uint64(v)))))))))))
 }
+
+func select1(x, y chan bool) int { // ERROR "can inline select1" "x does not escape" "y does not escape"
+	select {
+	case <-x:
+		return 1
+	case <-y:
+		return 2
+	}
+}
+
+func select2(x, y chan bool) { // ERROR "can inline select2" "x does not escape" "y does not escape"
+loop: // test that labeled select can be inlined.
+	select {
+	case <-x:
+		break loop
+	case <-y:
+	}
+}
+
+func inlineSelect2(x, y chan bool) { // ERROR "can inline inlineSelect2" ERROR "x does not escape" "y does not escape"
+loop:
+	for i := 0; i < 5; i++ {
+		if i == 3 {
+			break loop
+		}
+		select2(x, y) // ERROR "inlining call to select2"
+	}
+}
diff --git a/test/interface/embed1.dir/embed0.go b/test/interface/embed1.dir/embed0.go
index 728bec7..4aed391 100644
--- a/test/interface/embed1.dir/embed0.go
+++ b/test/interface/embed1.dir/embed0.go
@@ -7,10 +7,11 @@
 package p
 
 type T int
+
 func (t T) m() {}
 
-type I interface { m() }
-type J interface { I }
+type I interface{ m() }
+type J interface{ I }
 
 func main() {
 	var i I
diff --git a/test/intrinsic_atomic.go b/test/intrinsic_atomic.go
index 61911b7..a1004c8 100644
--- a/test/intrinsic_atomic.go
+++ b/test/intrinsic_atomic.go
@@ -1,5 +1,5 @@
 // errorcheck -0 -d=ssa/intrinsics/debug
-// +build amd64 arm64 mips mipsle mips64 mips64le ppc64 ppc64le riscv64 s390x
+// +build amd64 arm64 loong64 mips mipsle mips64 mips64le ppc64 ppc64le riscv64 s390x
 
 // Copyright 2016 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/linkmain_run.go b/test/linkmain_run.go
index 077f7ee..6bc82df 100644
--- a/test/linkmain_run.go
+++ b/test/linkmain_run.go
@@ -62,14 +62,14 @@
 	}
 
 	// helloworld.go is package main
-	run("go tool compile -o", tmp("linkmain.o"), "helloworld.go")
-	run("go tool compile -pack -o", tmp("linkmain.a"), "helloworld.go")
+	run("go tool compile -p=main -o", tmp("linkmain.o"), "helloworld.go")
+	run("go tool compile -p=main -pack -o", tmp("linkmain.a"), "helloworld.go")
 	run("go tool link -o", tmp("linkmain.exe"), tmp("linkmain.o"))
 	run("go tool link -o", tmp("linkmain.exe"), tmp("linkmain.a"))
 
 	// linkmain.go is not
-	run("go tool compile -o", tmp("linkmain1.o"), "linkmain.go")
-	run("go tool compile -pack -o", tmp("linkmain1.a"), "linkmain.go")
+	run("go tool compile -p=notmain -o", tmp("linkmain1.o"), "linkmain.go")
+	run("go tool compile -p=notmain -pack -o", tmp("linkmain1.a"), "linkmain.go")
 	runFail("go tool link -o", tmp("linkmain.exe"), tmp("linkmain1.o"))
 	runFail("go tool link -o", tmp("linkmain.exe"), tmp("linkmain1.a"))
 	cleanup()
diff --git a/test/linkname.dir/linkname2.go b/test/linkname.dir/linkname2.go
index 9323ac5..d2ee841 100644
--- a/test/linkname.dir/linkname2.go
+++ b/test/linkname.dir/linkname2.go
@@ -2,7 +2,7 @@
 
 import _ "unsafe"
 
-//go:linkname byteIndex linkname1.indexByte
+//go:linkname byteIndex test/linkname1.indexByte
 func byteIndex(xs []byte, b byte) int // ERROR "leaking param: xs"
 
 func ContainsSlash(data []byte) bool { // ERROR "leaking param: data" "can inline ContainsSlash"
diff --git a/test/linkname2.go b/test/linkname2.go
deleted file mode 100644
index 5eb250f..0000000
--- a/test/linkname2.go
+++ /dev/null
@@ -1,21 +0,0 @@
-// errorcheck
-
-// Copyright 2020 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Tests that errors are reported for misuse of linkname.
-package p
-
-import _ "unsafe"
-
-type t int
-
-var x, y int
-
-//go:linkname x ok
-
-// ERROR "//go:linkname requires linkname argument or -p compiler flag"
-
-//line linkname2.go:18
-//go:linkname y
diff --git a/test/linkobj.go b/test/linkobj.go
index 4c9bd24..023996a 100644
--- a/test/linkobj.go
+++ b/test/linkobj.go
@@ -37,28 +37,28 @@
 
 	writeFile("p1.go", `
 		package p1
-		
+
 		func F() {
 			println("hello from p1")
 		}
 	`)
 	writeFile("p2.go", `
 		package p2
-		
+
 		import "./p1"
 
 		func F() {
 			p1.F()
 			println("hello from p2")
 		}
-		
+
 		func main() {}
 	`)
 	writeFile("p3.go", `
 		package main
 
 		import "./p2"
-		
+
 		func main() {
 			p2.F()
 			println("hello from main")
@@ -76,9 +76,9 @@
 		}
 
 		// inlining is disabled to make sure that the link objects contain needed code.
-		run("go", "tool", "compile", pkg, "-D", ".", "-I", ".", "-l", "-o", "p1."+o, "-linkobj", "p1.lo", "p1.go")
-		run("go", "tool", "compile", pkg, "-D", ".", "-I", ".", "-l", "-o", "p2."+o, "-linkobj", "p2.lo", "p2.go")
-		run("go", "tool", "compile", pkg, "-D", ".", "-I", ".", "-l", "-o", "p3."+o, "-linkobj", "p3.lo", "p3.go")
+		run("go", "tool", "compile", "-p=p1", pkg, "-D", ".", "-I", ".", "-l", "-o", "p1."+o, "-linkobj", "p1.lo", "p1.go")
+		run("go", "tool", "compile", "-p=p2", pkg, "-D", ".", "-I", ".", "-l", "-o", "p2."+o, "-linkobj", "p2.lo", "p2.go")
+		run("go", "tool", "compile", "-p=main", pkg, "-D", ".", "-I", ".", "-l", "-o", "p3."+o, "-linkobj", "p3.lo", "p3.go")
 
 		cp("p1."+o, "p1.oo")
 		cp("p2."+o, "p2.oo")
diff --git a/test/live_syscall.go b/test/live_syscall.go
deleted file mode 100644
index b920ff6..0000000
--- a/test/live_syscall.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// errorcheck -0 -m -live
-
-// +build !windows,!js
-
-// Copyright 2015 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test escape analysis and liveness inferred for syscall.Syscall-like functions.
-
-package p
-
-import (
-	"syscall"
-	"unsafe"
-)
-
-func f(uintptr) // ERROR "assuming arg#1 is unsafe uintptr"
-
-func g() { // ERROR "can inline g"
-	var t int
-	f(uintptr(unsafe.Pointer(&t))) // ERROR "live at call to f: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
-}
-
-func h() { // ERROR "can inline h"
-	var v int
-	syscall.Syscall(0, 1, uintptr(unsafe.Pointer(&v)), 2) // ERROR "live at call to Syscall: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
-}
-
-func i() { // ERROR "can inline i"
-	var t int
-	p := unsafe.Pointer(&t)
-	f(uintptr(p))           // ERROR "live at call to f: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
-}
-
-func j() { // ERROR "can inline j"
-	var v int
-	p := unsafe.Pointer(&v)
-	syscall.Syscall(0, 1, uintptr(p), 2) // ERROR "live at call to Syscall: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
-}
diff --git a/test/live_uintptrkeepalive.go b/test/live_uintptrkeepalive.go
new file mode 100644
index 0000000..e39e31f
--- /dev/null
+++ b/test/live_uintptrkeepalive.go
@@ -0,0 +1,63 @@
+// errorcheck -0 -m -live -std
+
+// +build !windows,!js
+
+// Copyright 2015 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test escape analysis and liveness inferred for uintptrkeepalive functions.
+//
+// This behavior is enabled automatically for function declarations with no
+// bodies (assembly, linkname), as well as explicitly on complete functions
+// with //go:uintptrkeepalive.
+//
+// This is most important for syscall.Syscall (and similar functions), so we
+// test it explicitly.
+
+package p
+
+import (
+	"syscall"
+	"unsafe"
+)
+
+func implicit(uintptr) // ERROR "assuming arg#1 is unsafe uintptr"
+
+//go:uintptrkeepalive
+//go:nosplit
+func explicit(uintptr) {
+}
+
+func autotmpImplicit() { // ERROR "can inline autotmpImplicit"
+	var t int
+	implicit(uintptr(unsafe.Pointer(&t))) // ERROR "live at call to implicit: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
+}
+
+func autotmpExplicit() { // ERROR "can inline autotmpExplicit"
+	var t int
+	explicit(uintptr(unsafe.Pointer(&t))) // ERROR "live at call to explicit: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
+}
+
+func autotmpSyscall() { // ERROR "can inline autotmpSyscall"
+	var v int
+	syscall.Syscall(0, 1, uintptr(unsafe.Pointer(&v)), 2) // ERROR "live at call to Syscall: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
+}
+
+func localImplicit() { // ERROR "can inline localImplicit"
+	var t int
+	p := unsafe.Pointer(&t)
+	implicit(uintptr(p))           // ERROR "live at call to implicit: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
+}
+
+func localExplicit() { // ERROR "can inline localExplicit"
+	var t int
+	p := unsafe.Pointer(&t)
+	explicit(uintptr(p))           // ERROR "live at call to explicit: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
+}
+
+func localSyscall() { // ERROR "can inline localSyscall"
+	var v int
+	p := unsafe.Pointer(&v)
+	syscall.Syscall(0, 1, uintptr(p), 2) // ERROR "live at call to Syscall: .?autotmp" "stack object .autotmp_[0-9]+ unsafe.Pointer$"
+}
diff --git a/test/locklinear.go b/test/locklinear.go
deleted file mode 100644
index 54e40a5..0000000
--- a/test/locklinear.go
+++ /dev/null
@@ -1,171 +0,0 @@
-// run
-
-// Copyright 2017 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Test that locks don't go quadratic due to runtime hash table collisions.
-
-package main
-
-import (
-	"bytes"
-	"fmt"
-	"log"
-	"os"
-	"runtime"
-	"runtime/pprof"
-	"sync"
-	"time"
-)
-
-const debug = false
-
-// checkLinear asserts that the running time of f(n) is at least linear but sub-quadratic.
-// tries is the initial number of iterations.
-func checkLinear(typ string, tries int, f func(n int)) {
-	// Depending on the machine and OS, this test might be too fast
-	// to measure with accurate enough granularity. On failure,
-	// make it run longer, hoping that the timing granularity
-	// is eventually sufficient.
-
-	timeF := func(n int) time.Duration {
-		t1 := time.Now()
-		f(n)
-		return time.Since(t1)
-	}
-
-	n := tries
-	fails := 0
-	var buf bytes.Buffer
-	inversions := 0
-	for {
-		t1 := timeF(n)
-		t2 := timeF(2 * n)
-		if debug {
-			println(n, t1.String(), 2*n, t2.String())
-		}
-		fmt.Fprintf(&buf, "%d %v %d %v (%.1fX)\n", n, t1, 2*n, t2, float64(t2)/float64(t1))
-		// should be 2x (linear); allow up to 3x
-		if t1*3/2 < t2 && t2 < t1*3 {
-			return
-		}
-		if t2 < t1 {
-			if inversions++; inversions >= 5 {
-				// The system must be overloaded (some builders). Give up.
-				return
-			}
-			continue // try again; don't increment fails
-		}
-		// Once the test runs long enough for n ops,
-		// try to get the right ratio at least once.
-		// If many in a row all fail, give up.
-		if fails++; fails >= 5 {
-			// If 2n ops run in under a second and the ratio
-			// doesn't work out, make n bigger, trying to reduce
-			// the effect that a constant amount of overhead has
-			// on the computed ratio.
-			if t2 < time.Second*4/10 {
-				fails = 0
-				n *= 2
-				continue
-			}
-			panic(fmt.Sprintf("%s: too slow: %d ops: %v; %d ops: %v\n\n%s",
-				typ, n, t1, 2*n, t2, buf.String()))
-		}
-	}
-}
-
-const offset = 251 // known size of runtime hash table
-
-const profile = false
-
-func main() {
-	if profile {
-		f, err := os.Create("lock.prof")
-		if err != nil {
-			log.Fatal(err)
-		}
-		pprof.StartCPUProfile(f)
-		defer pprof.StopCPUProfile()
-	}
-
-	checkLinear("lockone", 1000, func(n int) {
-		ch := make(chan int)
-		locks := make([]sync.RWMutex, offset+1)
-		for i := 0; i < n; i++ {
-			go func() {
-				locks[0].Lock()
-				ch <- 1
-			}()
-		}
-		time.Sleep(1 * time.Millisecond)
-
-		go func() {
-			for j := 0; j < n; j++ {
-				locks[1].Lock()
-				locks[offset].Lock()
-				locks[1].Unlock()
-				runtime.Gosched()
-				locks[offset].Unlock()
-			}
-		}()
-
-		for j := 0; j < n; j++ {
-			locks[1].Lock()
-			locks[offset].Lock()
-			locks[1].Unlock()
-			runtime.Gosched()
-			locks[offset].Unlock()
-		}
-
-		for i := 0; i < n; i++ {
-			<-ch
-			locks[0].Unlock()
-		}
-	})
-
-	if runtime.GOARCH == "arm" && os.Getenv("GOARM") == "5" {
-		// lockmany reliably fails on the linux-arm-arm5spacemonkey
-		// builder. See https://golang.org/issue/24221.
-		return
-	}
-
-	checkLinear("lockmany", 1000, func(n int) {
-		locks := make([]sync.RWMutex, n*offset+1)
-
-		var wg sync.WaitGroup
-		for i := 0; i < n; i++ {
-			wg.Add(1)
-			go func(i int) {
-				locks[(i+1)*offset].Lock()
-				wg.Done()
-				locks[(i+1)*offset].Lock()
-				locks[(i+1)*offset].Unlock()
-			}(i)
-		}
-		wg.Wait()
-
-		go func() {
-			for j := 0; j < n; j++ {
-				locks[1].Lock()
-				locks[0].Lock()
-				locks[1].Unlock()
-				runtime.Gosched()
-				locks[0].Unlock()
-			}
-		}()
-
-		for j := 0; j < n; j++ {
-			locks[1].Lock()
-			locks[0].Lock()
-			locks[1].Unlock()
-			runtime.Gosched()
-			locks[0].Unlock()
-		}
-
-		for i := 0; i < n; i++ {
-			locks[(i+1)*offset].Unlock()
-		}
-	})
-}
diff --git a/test/loopbce.go b/test/loopbce.go
index f0c9bd0..4ae9a6a 100644
--- a/test/loopbce.go
+++ b/test/loopbce.go
@@ -3,6 +3,8 @@
 
 package main
 
+import "math"
+
 func f0a(a []int) int {
 	x := 0
 	for i := range a { // ERROR "Induction variable: limits \[0,\?\), increment 1$"
@@ -281,8 +283,8 @@
 
 func d3(a [100]int) [100]int {
 	for i := 0; i <= 99; i++ { // ERROR "Induction variable: limits \[0,99\], increment 1$"
-		for j := 0; j <= i-1; j++ { // ERROR "Induction variable: limits \[0,\?\], increment 1$"
-			a[j] = 0   // ERROR "Proved IsInBounds$"
+		for j := 0; j <= i-1; j++ {
+			a[j] = 0
 			a[j+1] = 0 // ERROR "Proved IsInBounds$"
 			a[j+2] = 0
 		}
@@ -290,7 +292,61 @@
 	return a
 }
 
-func nobce1() {
+func d4() {
+	for i := int64(math.MaxInt64 - 9); i < math.MaxInt64-2; i += 4 { // ERROR "Induction variable: limits \[9223372036854775798,9223372036854775805\), increment 4$"
+		useString("foo")
+	}
+	for i := int64(math.MaxInt64 - 8); i < math.MaxInt64-2; i += 4 { // ERROR "Induction variable: limits \[9223372036854775799,9223372036854775805\), increment 4$"
+		useString("foo")
+	}
+	for i := int64(math.MaxInt64 - 7); i < math.MaxInt64-2; i += 4 {
+		useString("foo")
+	}
+	for i := int64(math.MaxInt64 - 6); i < math.MaxInt64-2; i += 4 { // ERROR "Induction variable: limits \[9223372036854775801,9223372036854775805\), increment 4$"
+		useString("foo")
+	}
+	for i := int64(math.MaxInt64 - 9); i <= math.MaxInt64-2; i += 4 { // ERROR "Induction variable: limits \[9223372036854775798,9223372036854775805\], increment 4$"
+		useString("foo")
+	}
+	for i := int64(math.MaxInt64 - 8); i <= math.MaxInt64-2; i += 4 { // ERROR "Induction variable: limits \[9223372036854775799,9223372036854775805\], increment 4$"
+		useString("foo")
+	}
+	for i := int64(math.MaxInt64 - 7); i <= math.MaxInt64-2; i += 4 {
+		useString("foo")
+	}
+	for i := int64(math.MaxInt64 - 6); i <= math.MaxInt64-2; i += 4 {
+		useString("foo")
+	}
+}
+
+func d5() {
+	for i := int64(math.MinInt64 + 9); i > math.MinInt64+2; i -= 4 { // ERROR "Induction variable: limits \(-9223372036854775806,-9223372036854775799\], increment 4"
+		useString("foo")
+	}
+	for i := int64(math.MinInt64 + 8); i > math.MinInt64+2; i -= 4 { // ERROR "Induction variable: limits \(-9223372036854775806,-9223372036854775800\], increment 4"
+		useString("foo")
+	}
+	for i := int64(math.MinInt64 + 7); i > math.MinInt64+2; i -= 4 {
+		useString("foo")
+	}
+	for i := int64(math.MinInt64 + 6); i > math.MinInt64+2; i -= 4 { // ERROR "Induction variable: limits \(-9223372036854775806,-9223372036854775802\], increment 4"
+		useString("foo")
+	}
+	for i := int64(math.MinInt64 + 9); i >= math.MinInt64+2; i -= 4 { // ERROR "Induction variable: limits \[-9223372036854775806,-9223372036854775799\], increment 4"
+		useString("foo")
+	}
+	for i := int64(math.MinInt64 + 8); i >= math.MinInt64+2; i -= 4 { // ERROR "Induction variable: limits \[-9223372036854775806,-9223372036854775800\], increment 4"
+		useString("foo")
+	}
+	for i := int64(math.MinInt64 + 7); i >= math.MinInt64+2; i -= 4 {
+		useString("foo")
+	}
+	for i := int64(math.MinInt64 + 6); i >= math.MinInt64+2; i -= 4 {
+		useString("foo")
+	}
+}
+
+func bce1() {
 	// tests overflow of max-min
 	a := int64(9223372036854774057)
 	b := int64(-1547)
@@ -300,8 +356,7 @@
 		panic("invalid test: modulos should differ")
 	}
 
-	for i := b; i < a; i += z {
-		// No induction variable is possible because i will overflow a first iteration.
+	for i := b; i < a; i += z { // ERROR "Induction variable: limits \[-1547,9223372036854774057\), increment 1337"
 		useString("foobar")
 	}
 }
diff --git a/test/nosplit.go b/test/nosplit.go
index 7c7e1bf..218eb73 100644
--- a/test/nosplit.go
+++ b/test/nosplit.go
@@ -51,7 +51,8 @@
 start 0
 
 # Large frame marked nosplit is always wrong.
-start 10000 nosplit
+# Frame is so large it overflows cmd/link's int16.
+start 100000 nosplit
 REJECT
 
 # Calling a large frame is okay.
@@ -70,6 +71,18 @@
 start 0 nosplit call start
 REJECT
 
+# Non-trivial recursion runs out of space.
+start 0 call f1
+f1 0 nosplit call f2
+f2 0 nosplit call f1
+REJECT
+# Same but cycle starts below nosplit entry.
+start 0 call f1
+f1 0 nosplit call f2
+f2 0 nosplit call f3
+f3 0 nosplit call f2
+REJECT
+
 # Chains of ordinary functions okay.
 start 0 call f1
 f1 80 call f2
@@ -105,6 +118,14 @@
 end 1000
 REJECT
 
+# Two paths both go over the stack limit.
+start 0 call f1
+f1 80 nosplit call f2 call f3
+f2 40 nosplit call f4
+f3 96 nosplit
+f4 40 nosplit
+REJECT
+
 # Test cases near the 128-byte limit.
 
 # Ordinary stack split frame is always okay.
@@ -263,6 +284,9 @@
 		case "mips64", "mips64le":
 			ptrSize = 8
 			fmt.Fprintf(&buf, "#define REGISTER (R0)\n")
+		case "loong64":
+			ptrSize = 8
+			fmt.Fprintf(&buf, "#define REGISTER (R0)\n")
 		case "ppc64", "ppc64le":
 			ptrSize = 8
 			fmt.Fprintf(&buf, "#define REGISTER (CTR)\n")
@@ -292,12 +316,13 @@
 		fmt.Fprintf(&gobuf, "func main() { main0() }\n")
 		fmt.Fprintf(&buf, "TEXT ·main0(SB),0,$0-0\n\tCALL ·start(SB)\n")
 
+		adjusted := false
 		for _, line := range strings.Split(lines, "\n") {
 			line = strings.TrimSpace(line)
 			if line == "" {
 				continue
 			}
-			for i, subline := range strings.Split(line, ";") {
+			for _, subline := range strings.Split(line, ";") {
 				subline = strings.TrimSpace(subline)
 				if subline == "" {
 					continue
@@ -311,10 +336,19 @@
 				name := m[1]
 				size, _ := strconv.Atoi(m[2])
 
+				if size%ptrSize == 4 {
+					continue TestCases
+				}
+				nosplit := m[3]
+				body := m[4]
+
 				// The limit was originally 128 but is now 800 (928-128).
 				// Instead of rewriting the test cases above, adjust
-				// the first stack frame to use up the extra bytes.
-				if i == 0 {
+				// the first nosplit frame to use up the extra bytes.
+				// This isn't exactly right because we could have
+				// nosplit -> split -> nosplit, but it's good enough.
+				if !adjusted && nosplit != "" {
+					adjusted = true
 					size += (928 - 128) - 128
 					// Noopt builds have a larger stackguard.
 					// See ../src/cmd/dist/buildruntime.go:stackGuardMultiplier
@@ -326,12 +360,6 @@
 					}
 				}
 
-				if size%ptrSize == 4 {
-					continue TestCases
-				}
-				nosplit := m[3]
-				body := m[4]
-
 				if nosplit != "" {
 					nosplit = ",7"
 				} else {
diff --git a/test/oldescape_linkname.dir/linkname1.go b/test/oldescape_linkname.dir/linkname1.go
deleted file mode 100644
index 9c61522..0000000
--- a/test/oldescape_linkname.dir/linkname1.go
+++ /dev/null
@@ -1,10 +0,0 @@
-package x
-
-func indexByte(xs []byte, b byte) int { // ERROR "indexByte xs does not escape"
-	for i, x := range xs {
-		if x == b {
-			return i
-		}
-	}
-	return -1
-}
diff --git a/test/oldescape_linkname.dir/linkname2.go b/test/oldescape_linkname.dir/linkname2.go
deleted file mode 100644
index 5df4f50..0000000
--- a/test/oldescape_linkname.dir/linkname2.go
+++ /dev/null
@@ -1,13 +0,0 @@
-package y
-
-import _ "unsafe"
-
-//go:linkname byteIndex linkname1.indexByte
-func byteIndex(xs []byte, b byte) int
-
-func ContainsSlash(data []byte) bool { // ERROR "leaking param: data" "can inline ContainsSlash"
-	if byteIndex(data, '/') != -1 {
-		return true
-	}
-	return false
-}
diff --git a/test/oldescape_linkname.dir/linkname3.go b/test/oldescape_linkname.dir/linkname3.go
deleted file mode 100644
index cbbd3a1..0000000
--- a/test/oldescape_linkname.dir/linkname3.go
+++ /dev/null
@@ -1,11 +0,0 @@
-package main
-
-import _ "./linkname1"
-import "./linkname2"
-
-func main() { // ERROR "can inline main"
-	str := "hello/world"
-	bs := []byte(str)        // ERROR "\(\[\]byte\)\(str\) escapes to heap"
-	if y.ContainsSlash(bs) { // ERROR "inlining call to y.ContainsSlash"
-	}
-}
diff --git a/test/prove.go b/test/prove.go
index 83b0380..b7cc511 100644
--- a/test/prove.go
+++ b/test/prove.go
@@ -1036,6 +1036,14 @@
 	return n / int32(16) // ERROR "Proved Rsh32x64 shifts to zero"
 }
 
+func and(p []byte) ([]byte, []byte) { // issue #52563
+	const blocksize = 16
+	fullBlocks := len(p) &^ (blocksize - 1)
+	blk := p[:fullBlocks] // ERROR "Proved IsSliceInBounds$"
+	rem := p[fullBlocks:] // ERROR "Proved IsSliceInBounds$"
+	return blk, rem
+}
+
 //go:noinline
 func useInt(a int) {
 }
diff --git a/test/prove_constant_folding.go b/test/prove_constant_folding.go
new file mode 100644
index 0000000..d4bdb20
--- /dev/null
+++ b/test/prove_constant_folding.go
@@ -0,0 +1,32 @@
+// +build amd64
+// errorcheck -0 -d=ssa/prove/debug=2
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func f0i(x int) int {
+  if x == 20 {
+    return x // ERROR "Proved.+is constant 20$"
+  }
+
+  if (x + 20) == 20 {
+    return x + 5 // ERROR "Proved.+is constant 0$"
+  }
+
+  return x / 2
+}
+
+func f0u(x uint) uint {
+  if x == 20 {
+    return x // ERROR "Proved.+is constant 20$"
+  }
+
+  if (x + 20) == 20 {
+    return x + 5 // ERROR "Proved.+is constant 0$"
+  }
+
+  return x / 2
+}
diff --git a/test/run.go b/test/run.go
index ae5afc7..b2902f1 100644
--- a/test/run.go
+++ b/test/run.go
@@ -14,6 +14,7 @@
 	"flag"
 	"fmt"
 	"go/build"
+	"go/build/constraint"
 	"hash/fnv"
 	"io"
 	"io/fs"
@@ -32,10 +33,6 @@
 	"unicode"
 )
 
-// CompilerDefaultGLevel is the -G level used by default when not overridden by a
-// command-line flag
-const CompilerDefaultGLevel = 3
-
 var (
 	verbose        = flag.Bool("v", false, "verbose. if set, parallelism is set to 1.")
 	keep           = flag.Bool("k", false, "keep. keep temporary directory.")
@@ -48,7 +45,6 @@
 	updateErrors   = flag.Bool("update_errors", false, "update error messages in test file based on compiler output")
 	runoutputLimit = flag.Int("l", defaultRunOutputLimit(), "number of parallel runoutput tests to run")
 	force          = flag.Bool("f", false, "ignore expected-failure test lists")
-	generics       = flag.String("G", defaultGLevels, "a comma-separated list of -G compiler flags to test with")
 
 	shard  = flag.Int("shard", 0, "shard index to run. Only applicable if -shards is non-zero.")
 	shards = flag.Int("shards", 0, "number of shards. If 0, all tests are run. This is used by the continuous build.")
@@ -62,7 +58,7 @@
 }
 
 var env = func() (res envVars) {
-	cmd := exec.Command("go", "env", "-json")
+	cmd := exec.Command(goTool(), "env", "-json")
 	stdout, err := cmd.StdoutPipe()
 	if err != nil {
 		log.Fatal("StdoutPipe:", err)
@@ -79,22 +75,10 @@
 	return
 }()
 
-var unifiedEnabled, defaultGLevels = func() (bool, string) {
-	// TODO(mdempsky): This will give false negatives if the unified
-	// experiment is enabled by default, but presumably at that point we
-	// won't need to disable tests for it anymore anyway.
-	enabled := strings.Contains(","+env.GOEXPERIMENT+",", ",unified,")
-
-	// Test both -G=0 and -G=3 on the longtest builders, to make sure we
-	// don't accidentally break -G=0 mode until we're ready to remove it
-	// completely. But elsewhere, testing -G=3 alone should be enough.
-	glevels := "3"
-	if strings.Contains(os.Getenv("GO_BUILDER_NAME"), "longtest") {
-		glevels = "0,3"
-	}
-
-	return enabled, glevels
-}()
+// TODO(mdempsky): This will give false negatives if the unified
+// experiment is enabled by default, but presumably at that point we
+// won't need to disable tests for it anymore anyway.
+var unifiedEnabled = strings.Contains(","+env.GOEXPERIMENT+",", ",unified,")
 
 // defaultAllCodeGen returns the default value of the -all_codegen
 // flag. By default, we prefer to be fast (returning false), except on
@@ -132,15 +116,6 @@
 func main() {
 	flag.Parse()
 
-	var glevels []int
-	for _, s := range strings.Split(*generics, ",") {
-		glevel, err := strconv.Atoi(s)
-		if err != nil {
-			log.Fatalf("invalid -G flag: %v", err)
-		}
-		glevels = append(glevels, glevel)
-	}
-
 	findExecCmd()
 
 	// Disable parallelism if printing or if using a simulator.
@@ -165,11 +140,11 @@
 			}
 			if fi, err := os.Stat(arg); err == nil && fi.IsDir() {
 				for _, baseGoFile := range goFiles(arg) {
-					tests = append(tests, startTests(arg, baseGoFile, glevels)...)
+					tests = append(tests, startTest(arg, baseGoFile))
 				}
 			} else if strings.HasSuffix(arg, ".go") {
 				dir, file := filepath.Split(arg)
-				tests = append(tests, startTests(dir, file, glevels)...)
+				tests = append(tests, startTest(dir, file))
 			} else {
 				log.Fatalf("can't yet deal with non-directory and non-go file %q", arg)
 			}
@@ -177,7 +152,7 @@
 	} else {
 		for _, dir := range dirs {
 			for _, baseGoFile := range goFiles(dir) {
-				tests = append(tests, startTests(dir, baseGoFile, glevels)...)
+				tests = append(tests, startTest(dir, baseGoFile))
 			}
 		}
 	}
@@ -210,8 +185,7 @@
 		resCount[status]++
 		dt := fmt.Sprintf("%.3fs", test.dt.Seconds())
 		if status == "FAIL" {
-			fmt.Printf("# go run run.go -G=%v %s\n%s\nFAIL\t%s\t%s\n",
-				test.glevel,
+			fmt.Printf("# go run run.go -- %s\n%s\nFAIL\t%s\t%s\n",
 				path.Join(test.dir, test.gofile),
 				errStr, test.goFileName(), dt)
 			continue
@@ -281,7 +255,7 @@
 type runCmd func(...string) ([]byte, error)
 
 func compileFile(runcmd runCmd, longname string, flags []string) (out []byte, err error) {
-	cmd := []string{goTool(), "tool", "compile", "-e"}
+	cmd := []string{goTool(), "tool", "compile", "-e", "-p=p"}
 	cmd = append(cmd, flags...)
 	if *linkshared {
 		cmd = append(cmd, "-dynlink", "-installsuffix=dynlink")
@@ -290,11 +264,13 @@
 	return runcmd(cmd...)
 }
 
-func compileInDir(runcmd runCmd, dir string, flags []string, localImports bool, names ...string) (out []byte, err error) {
-	cmd := []string{goTool(), "tool", "compile", "-e"}
-	if localImports {
-		// Set relative path for local imports and import search path to current dir.
-		cmd = append(cmd, "-D", ".", "-I", ".")
+func compileInDir(runcmd runCmd, dir string, flags []string, pkgname string, names ...string) (out []byte, err error) {
+	cmd := []string{goTool(), "tool", "compile", "-e", "-D", "test", "-I", "."}
+	if pkgname == "main" {
+		cmd = append(cmd, "-p=main")
+	} else {
+		pkgname = path.Join("test", strings.TrimSuffix(names[0], ".go"))
+		cmd = append(cmd, "-o", pkgname+".a", "-p", pkgname)
 	}
 	cmd = append(cmd, flags...)
 	if *linkshared {
@@ -330,7 +306,6 @@
 	dir, gofile string
 	donec       chan bool // closed when done
 	dt          time.Duration
-	glevel      int // what -G level this test should use
 
 	src string
 
@@ -338,37 +313,31 @@
 	err     error
 
 	// expectFail indicates whether the (overall) test recipe is
-	// expected to fail under the current test configuration (e.g., -G=3
-	// or GOEXPERIMENT=unified).
+	// expected to fail under the current test configuration (e.g.,
+	// GOEXPERIMENT=unified).
 	expectFail bool
 }
 
 // initExpectFail initializes t.expectFail based on the build+test
 // configuration.
-func (t *test) initExpectFail(hasGFlag bool) {
+func (t *test) initExpectFail() {
 	if *force {
 		return
 	}
 
-	var failureSets []map[string]bool
+	failureSets := []map[string]bool{types2Failures}
 
-	if t.glevel == 0 && !hasGFlag && !unifiedEnabled {
-		failureSets = append(failureSets, g0Failures)
+	// Note: gccgo supports more 32-bit architectures than this, but
+	// hopefully the 32-bit failures are fixed before this matters.
+	switch goarch {
+	case "386", "arm", "mips", "mipsle":
+		failureSets = append(failureSets, types2Failures32Bit)
+	}
+
+	if unifiedEnabled {
+		failureSets = append(failureSets, unifiedFailures)
 	} else {
-		failureSets = append(failureSets, types2Failures)
-
-		// Note: gccgo supports more 32-bit architectures than this, but
-		// hopefully the 32-bit failures are fixed before this matters.
-		switch goarch {
-		case "386", "arm", "mips", "mipsle":
-			failureSets = append(failureSets, types2Failures32Bit)
-		}
-
-		if unifiedEnabled {
-			failureSets = append(failureSets, unifiedFailures)
-		} else {
-			failureSets = append(failureSets, g3Failures)
-		}
+		failureSets = append(failureSets, go118Failures)
 	}
 
 	filename := strings.Replace(t.goFileName(), "\\", "/", -1) // goFileName() uses \ on Windows
@@ -381,27 +350,22 @@
 	}
 }
 
-func startTests(dir, gofile string, glevels []int) []*test {
-	tests := make([]*test, len(glevels))
-	for i, glevel := range glevels {
-		t := &test{
-			dir:    dir,
-			gofile: gofile,
-			glevel: glevel,
-			donec:  make(chan bool, 1),
-		}
-		if toRun == nil {
-			toRun = make(chan *test, maxTests)
-			go runTests()
-		}
-		select {
-		case toRun <- t:
-		default:
-			panic("toRun buffer size (maxTests) is too small")
-		}
-		tests[i] = t
+func startTest(dir, gofile string) *test {
+	t := &test{
+		dir:    dir,
+		gofile: gofile,
+		donec:  make(chan bool, 1),
 	}
-	return tests
+	if toRun == nil {
+		toRun = make(chan *test, maxTests)
+		go runTests()
+	}
+	select {
+	case toRun <- t:
+	default:
+		panic("toRun buffer size (maxTests) is too small")
+	}
+	return t
 }
 
 // runTests runs tests in parallel, but respecting the order they
@@ -454,28 +418,33 @@
 	return pkgname[1], nil
 }
 
+type goDirPkg struct {
+	name  string
+	files []string
+}
+
 // If singlefilepkgs is set, each file is considered a separate package
 // even if the package names are the same.
-func goDirPackages(longdir string, singlefilepkgs bool) ([][]string, error) {
+func goDirPackages(longdir string, singlefilepkgs bool) ([]*goDirPkg, error) {
 	files, err := goDirFiles(longdir)
 	if err != nil {
 		return nil, err
 	}
-	var pkgs [][]string
-	m := make(map[string]int)
+	var pkgs []*goDirPkg
+	m := make(map[string]*goDirPkg)
 	for _, file := range files {
 		name := file.Name()
 		pkgname, err := getPackageNameFromSource(filepath.Join(longdir, name))
 		if err != nil {
 			log.Fatal(err)
 		}
-		i, ok := m[pkgname]
+		p, ok := m[pkgname]
 		if singlefilepkgs || !ok {
-			i = len(pkgs)
-			pkgs = append(pkgs, nil)
-			m[pkgname] = i
+			p = &goDirPkg{name: pkgname}
+			pkgs = append(pkgs, p)
+			m[pkgname] = p
 		}
-		pkgs[i] = append(pkgs[i], name)
+		p.files = append(p.files, name)
 	}
 	return pkgs, nil
 }
@@ -494,40 +463,24 @@
 		return true, ""
 	}
 	for _, line := range strings.Split(src, "\n") {
-		line = strings.TrimSpace(line)
-		if strings.HasPrefix(line, "//") {
-			line = line[2:]
-		} else {
-			continue
-		}
-		line = strings.TrimSpace(line)
-		if len(line) == 0 || line[0] != '+' {
-			continue
-		}
-		gcFlags := os.Getenv("GO_GCFLAGS")
-		ctxt := &context{
-			GOOS:       goos,
-			GOARCH:     goarch,
-			cgoEnabled: cgoEnabled,
-			noOptEnv:   strings.Contains(gcFlags, "-N") || strings.Contains(gcFlags, "-l"),
+		if strings.HasPrefix(line, "package ") {
+			break
 		}
 
-		words := strings.Fields(line)
-		if words[0] == "+build" {
-			ok := false
-			for _, word := range words[1:] {
-				if ctxt.match(word) {
-					ok = true
-					break
-				}
+		if expr, err := constraint.Parse(line); err == nil {
+			gcFlags := os.Getenv("GO_GCFLAGS")
+			ctxt := &context{
+				GOOS:       goos,
+				GOARCH:     goarch,
+				cgoEnabled: cgoEnabled,
+				noOptEnv:   strings.Contains(gcFlags, "-N") || strings.Contains(gcFlags, "-l"),
 			}
-			if !ok {
-				// no matching tag found.
+
+			if !expr.Eval(ctxt.match) {
 				return false, line
 			}
 		}
 	}
-	// no build tags
 	return true, ""
 }
 
@@ -535,16 +488,6 @@
 	if name == "" {
 		return false
 	}
-	if first, rest, ok := strings.Cut(name, ","); ok {
-		// comma-separated list
-		return ctxt.match(first) && ctxt.match(rest)
-	}
-	if strings.HasPrefix(name, "!!") { // bad syntax, reject always
-		return false
-	}
-	if strings.HasPrefix(name, "!") { // negation
-		return len(name) > 1 && !ctxt.match(name[1:])
-	}
 
 	// Tags must be letters, digits, underscores or dots.
 	// Unlike in Go identifiers, all digits are fine (e.g., "386").
@@ -589,15 +532,11 @@
 // or else the commands will rebuild any needed packages (like runtime)
 // over and over.
 func (t *test) goGcflags() string {
-	flags := os.Getenv("GO_GCFLAGS")
-	if t.glevel != CompilerDefaultGLevel {
-		flags = fmt.Sprintf("%s -G=%v", flags, t.glevel)
-	}
-	return "-gcflags=all=" + flags
+	return "-gcflags=all=" + os.Getenv("GO_GCFLAGS")
 }
 
 func (t *test) goGcflagsIsEmpty() bool {
-	return "" == os.Getenv("GO_GCFLAGS") && t.glevel == CompilerDefaultGLevel
+	return "" == os.Getenv("GO_GCFLAGS")
 }
 
 var errTimeout = errors.New("command exceeded time limit")
@@ -650,8 +589,6 @@
 	wantError := false
 	wantAuto := false
 	singlefilepkgs := false
-	setpkgpaths := false
-	localImports := true
 	f, err := splitQuoted(action)
 	if err != nil {
 		t.err = fmt.Errorf("invalid test recipe: %v", err)
@@ -695,14 +632,6 @@
 			wantError = false
 		case "-s":
 			singlefilepkgs = true
-		case "-P":
-			setpkgpaths = true
-		case "-n":
-			// Do not set relative path for local imports to current dir,
-			// e.g. do not pass -D . -I . to the compiler.
-			// Used in fixedbugs/bug345.go to allow compilation and import of local pkg.
-			// See golang.org/issue/25635
-			localImports = false
 		case "-t": // timeout in seconds
 			args = args[1:]
 			var err error
@@ -744,60 +673,7 @@
 		}
 	}
 
-	type Tool int
-
-	const (
-		_ Tool = iota
-		AsmCheck
-		Build
-		Run
-		Compile
-	)
-
-	// validForGLevel reports whether the current test is valid to run
-	// at the specified -G level. If so, it may update flags as
-	// necessary to test with -G.
-	validForGLevel := func(tool Tool) bool {
-		hasGFlag := false
-		for _, flag := range flags {
-			if strings.Contains(flag, "-G") {
-				hasGFlag = true
-			}
-		}
-
-		// In unified IR mode, run the test regardless of explicit -G flag.
-		if !unifiedEnabled && hasGFlag && t.glevel != CompilerDefaultGLevel {
-			// test provides explicit -G flag already; don't run again
-			if *verbose {
-				fmt.Printf("excl\t%s\n", t.goFileName())
-			}
-			return false
-		}
-
-		t.initExpectFail(hasGFlag)
-
-		switch tool {
-		case Build, Run:
-			// ok; handled in goGcflags
-
-		case Compile:
-			if !hasGFlag {
-				flags = append(flags, fmt.Sprintf("-G=%v", t.glevel))
-			}
-
-		default:
-			if t.glevel != CompilerDefaultGLevel {
-				// we don't know how to add -G for this test yet
-				if *verbose {
-					fmt.Printf("excl\t%s\n", t.goFileName())
-				}
-				return false
-			}
-		}
-
-		return true
-	}
-
+	t.initExpectFail()
 	t.makeTempDir()
 	if !*keep {
 		defer os.RemoveAll(t.tempDir)
@@ -834,6 +710,22 @@
 		if tempDirIsGOPATH {
 			cmd.Env = append(cmd.Env, "GOPATH="+t.tempDir)
 		}
+		// Put the bin directory of the GOROOT that built this program
+		// first in the path. This ensures that tests that use the "go"
+		// tool use the same one that built this program. This ensures
+		// that if you do "../bin/go run run.go" in this directory, all
+		// the tests that start subprocesses that "go tool compile" or
+		// whatever, use ../bin/go as their go tool, not whatever happens
+		// to be first in the user's path.
+		path := os.Getenv("PATH")
+		newdir := filepath.Join(runtime.GOROOT(), "bin")
+		if path != "" {
+			path = newdir + string(filepath.ListSeparator) + path
+		} else {
+			path = newdir
+		}
+		cmd.Env = append(cmd.Env, "PATH="+path)
+
 		cmd.Env = append(cmd.Env, runenv...)
 
 		var err error
@@ -881,10 +773,6 @@
 		t.err = fmt.Errorf("unimplemented action %q", action)
 
 	case "asmcheck":
-		if !validForGLevel(AsmCheck) {
-			return
-		}
-
 		// Compile Go file and match the generated assembly
 		// against a set of regexps in comments.
 		ops := t.wantedAsmOpcodes(long)
@@ -939,15 +827,11 @@
 		return
 
 	case "errorcheck":
-		if !validForGLevel(Compile) {
-			return
-		}
-
 		// Compile Go file.
 		// Fail if wantError is true and compilation was successful and vice versa.
 		// Match errors produced by gc against errors in comments.
 		// TODO(gri) remove need for -C (disable printing of columns in error messages)
-		cmdline := []string{goTool(), "tool", "compile", "-d=panic", "-C", "-e", "-o", "a.o"}
+		cmdline := []string{goTool(), "tool", "compile", "-p=p", "-d=panic", "-C", "-e", "-o", "a.o"}
 		// No need to add -dynlink even if linkshared if we're just checking for errors...
 		cmdline = append(cmdline, flags...)
 		cmdline = append(cmdline, long)
@@ -973,18 +857,10 @@
 		t.err = t.errorCheck(string(out), wantAuto, long, t.gofile)
 
 	case "compile":
-		if !validForGLevel(Compile) {
-			return
-		}
-
 		// Compile Go file.
 		_, t.err = compileFile(runcmd, long, flags)
 
 	case "compiledir":
-		if !validForGLevel(Compile) {
-			return
-		}
-
 		// Compile all files in the directory as packages in lexicographic order.
 		longdir := filepath.Join(cwd, t.goDirName())
 		pkgs, err := goDirPackages(longdir, singlefilepkgs)
@@ -992,18 +868,14 @@
 			t.err = err
 			return
 		}
-		for _, gofiles := range pkgs {
-			_, t.err = compileInDir(runcmd, longdir, flags, localImports, gofiles...)
+		for _, pkg := range pkgs {
+			_, t.err = compileInDir(runcmd, longdir, flags, pkg.name, pkg.files...)
 			if t.err != nil {
 				return
 			}
 		}
 
 	case "errorcheckdir", "errorcheckandrundir":
-		if !validForGLevel(Compile) {
-			return
-		}
-
 		flags = append(flags, "-d=panic")
 		// Compile and errorCheck all files in the directory as packages in lexicographic order.
 		// If errorcheckdir and wantError, compilation of the last package must fail.
@@ -1020,8 +892,8 @@
 			// Preceding pkg must return an error from compileInDir.
 			errPkg--
 		}
-		for i, gofiles := range pkgs {
-			out, err := compileInDir(runcmd, longdir, flags, localImports, gofiles...)
+		for i, pkg := range pkgs {
+			out, err := compileInDir(runcmd, longdir, flags, pkg.name, pkg.files...)
 			if i == errPkg {
 				if wantError && err == nil {
 					t.err = fmt.Errorf("compilation succeeded unexpectedly\n%s", out)
@@ -1035,7 +907,7 @@
 				return
 			}
 			var fullshort []string
-			for _, name := range gofiles {
+			for _, name := range pkg.files {
 				fullshort = append(fullshort, filepath.Join(longdir, name), name)
 			}
 			t.err = t.errorCheck(string(out), wantAuto, fullshort...)
@@ -1049,10 +921,6 @@
 		fallthrough
 
 	case "rundir":
-		if !validForGLevel(Run) {
-			return
-		}
-
 		// Compile all files in the directory as packages in lexicographic order.
 		// In case of errorcheckandrundir, ignore failed compilation of the package before the last.
 		// Link as if the last file is the main package, run it.
@@ -1073,18 +941,8 @@
 			}
 		}
 
-		for i, gofiles := range pkgs {
-			pflags := []string{}
-			pflags = append(pflags, flags...)
-			if setpkgpaths {
-				fp := filepath.Join(longdir, gofiles[0])
-				pkgname, err := getPackageNameFromSource(fp)
-				if err != nil {
-					log.Fatal(err)
-				}
-				pflags = append(pflags, "-p", pkgname)
-			}
-			_, err := compileInDir(runcmd, longdir, pflags, localImports, gofiles...)
+		for i, pkg := range pkgs {
+			_, err := compileInDir(runcmd, longdir, flags, pkg.name, pkg.files...)
 			// Allow this package compilation fail based on conditions below;
 			// its errors were checked in previous case.
 			if err != nil && !(wantError && action == "errorcheckandrundir" && i == len(pkgs)-2) {
@@ -1092,7 +950,7 @@
 				return
 			}
 			if i == len(pkgs)-1 {
-				err = linkFile(runcmd, gofiles[0], ldflags)
+				err = linkFile(runcmd, pkg.files[0], ldflags)
 				if err != nil {
 					t.err = err
 					return
@@ -1111,10 +969,6 @@
 		}
 
 	case "runindir":
-		if !validForGLevel(Run) {
-			return
-		}
-
 		// Make a shallow copy of t.goDirName() in its own module and GOPATH, and
 		// run "go run ." in it. The module path (and hence import path prefix) of
 		// the copy is equal to the basename of the source directory.
@@ -1154,21 +1008,16 @@
 		t.checkExpectedOutput(out)
 
 	case "build":
-		if !validForGLevel(Build) {
-			return
-		}
-
 		// Build Go file.
-		_, err := runcmd(goTool(), "build", t.goGcflags(), "-o", "a.exe", long)
+		cmd := []string{goTool(), "build", t.goGcflags()}
+		cmd = append(cmd, flags...)
+		cmd = append(cmd, "-o", "a.exe", long)
+		_, err := runcmd(cmd...)
 		if err != nil {
 			t.err = err
 		}
 
 	case "builddir", "buildrundir":
-		if !validForGLevel(Build) {
-			return
-		}
-
 		// Build an executable from all the .go and .s files in a subdirectory.
 		// Run it and verify its output in the buildrundir case.
 		longdir := filepath.Join(cwd, t.goDirName())
@@ -1194,7 +1043,7 @@
 				t.err = fmt.Errorf("write empty go_asm.h: %s", err)
 				return
 			}
-			cmd := []string{goTool(), "tool", "asm", "-gensymabis", "-o", "symabis"}
+			cmd := []string{goTool(), "tool", "asm", "-p=main", "-gensymabis", "-o", "symabis"}
 			cmd = append(cmd, asms...)
 			_, err = runcmd(cmd...)
 			if err != nil {
@@ -1203,7 +1052,7 @@
 			}
 		}
 		var objs []string
-		cmd := []string{goTool(), "tool", "compile", "-e", "-D", ".", "-I", ".", "-o", "go.o"}
+		cmd := []string{goTool(), "tool", "compile", "-p=main", "-e", "-D", ".", "-I", ".", "-o", "go.o"}
 		if len(asms) > 0 {
 			cmd = append(cmd, "-asmhdr", "go_asm.h", "-symabis", "symabis")
 		}
@@ -1215,7 +1064,7 @@
 		}
 		objs = append(objs, "go.o")
 		if len(asms) > 0 {
-			cmd = []string{goTool(), "tool", "asm", "-e", "-I", ".", "-o", "asm.o"}
+			cmd = []string{goTool(), "tool", "asm", "-p=main", "-e", "-I", ".", "-o", "asm.o"}
 			cmd = append(cmd, asms...)
 			_, err = runcmd(cmd...)
 			if err != nil {
@@ -1248,10 +1097,6 @@
 		}
 
 	case "buildrun":
-		if !validForGLevel(Build) {
-			return
-		}
-
 		// Build an executable from Go file, then run it, verify its output.
 		// Useful for timeout tests where failure mode is infinite loop.
 		// TODO: not supported on NaCl
@@ -1277,10 +1122,6 @@
 		t.checkExpectedOutput(out)
 
 	case "run":
-		if !validForGLevel(Run) {
-			return
-		}
-
 		// Run Go file if no special go command flags are provided;
 		// otherwise build an executable and run it.
 		// Verify the output.
@@ -1296,7 +1137,7 @@
 			// Because we run lots of trivial test programs,
 			// the time adds up.
 			pkg := filepath.Join(t.tempDir, "pkg.a")
-			if _, err := runcmd(goTool(), "tool", "compile", "-o", pkg, t.goFileName()); err != nil {
+			if _, err := runcmd(goTool(), "tool", "compile", "-p=main", "-o", pkg, t.goFileName()); err != nil {
 				t.err = err
 				return
 			}
@@ -1324,10 +1165,6 @@
 		t.checkExpectedOutput(out)
 
 	case "runoutput":
-		if !validForGLevel(Run) {
-			return
-		}
-
 		// Run Go file and write its output into temporary Go file.
 		// Run generated Go file and verify its output.
 		rungatec <- true
@@ -1363,10 +1200,6 @@
 		t.checkExpectedOutput(out)
 
 	case "errorcheckoutput":
-		if !validForGLevel(Compile) {
-			return
-		}
-
 		// Run Go file and write its output into temporary Go file.
 		// Compile and errorCheck generated Go file.
 		runInDir = ""
@@ -1386,7 +1219,7 @@
 			t.err = fmt.Errorf("write tempfile:%s", err)
 			return
 		}
-		cmdline := []string{goTool(), "tool", "compile", "-d=panic", "-e", "-o", "a.o"}
+		cmdline := []string{goTool(), "tool", "compile", "-p=p", "-d=panic", "-e", "-o", "a.o"}
 		cmdline = append(cmdline, flags...)
 		cmdline = append(cmdline, tfile)
 		out, err = runcmd(cmdline...)
@@ -1436,6 +1269,10 @@
 	if *keep {
 		log.Printf("Temporary directory is %s", t.tempDir)
 	}
+	err = os.Mkdir(filepath.Join(t.tempDir, "test"), 0o755)
+	if err != nil {
+		log.Fatal(err)
+	}
 }
 
 // checkExpectedOutput compares the output from compiling and/or running with the contents
@@ -1764,6 +1601,7 @@
 		"amd64":   {"GOAMD64", "v1", "v2", "v3", "v4"},
 		"arm":     {"GOARM", "5", "6", "7"},
 		"arm64":   {},
+		"loong64": {},
 		"mips":    {"GOMIPS", "hardfloat", "softfloat"},
 		"mips64":  {"GOMIPS64", "hardfloat", "softfloat"},
 		"ppc64":   {"GOPPC64", "power8", "power9"},
@@ -2118,25 +1956,20 @@
 	})
 }
 
-// The following is temporary scaffolding to get types2 typechecker
-// up and running against the existing test cases. The explicitly
-// listed files don't pass yet, usually because the error messages
-// are slightly different (this list is not complete). Any errorcheck
-// tests that require output from analysis phases past initial type-
-// checking are also excluded since these phases are not running yet.
-// We can get rid of this code once types2 is fully plugged in.
+// The following sets of files are excluded from testing depending on configuration.
+// The types2Failures(32Bit) files pass with the 1.17 compiler but don't pass with
+// the 1.18 compiler using the new types2 type checker, or pass with sub-optimal
+// error(s).
 
-// List of files that the compiler cannot errorcheck with the new typechecker (compiler -G option).
-// Temporary scaffolding until we pass all the tests at which point this map can be removed.
+// List of files that the compiler cannot errorcheck with the new typechecker (types2).
 var types2Failures = setOf(
 	"notinheap.go",            // types2 doesn't report errors about conversions that are invalid due to //go:notinheap
 	"shift1.go",               // types2 reports two new errors which are probably not right
 	"fixedbugs/issue10700.go", // types2 should give hint about ptr to interface
 	"fixedbugs/issue18331.go", // missing error about misuse of //go:noescape (irgen needs code from noder)
 	"fixedbugs/issue18419.go", // types2 reports no field or method member, but should say unexported
-	"fixedbugs/issue20233.go", // types2 reports two instead of one error (pref: -G=0)
-	"fixedbugs/issue20245.go", // types2 reports two instead of one error (pref: -G=0)
-	"fixedbugs/issue28268.go", // types2 reports follow-on errors (pref: -G=0)
+	"fixedbugs/issue20233.go", // types2 reports two instead of one error (preference: 1.17 compiler)
+	"fixedbugs/issue20245.go", // types2 reports two instead of one error (preference: 1.17 compiler)
 	"fixedbugs/issue31053.go", // types2 reports "unknown field" instead of "cannot refer to unexported field"
 )
 
@@ -2146,14 +1979,16 @@
 	"fixedbugs/issue23305.go", // large untyped int passed to println (32-bit)
 )
 
-var g3Failures = setOf(
-	"typeparam/nested.go", // -G=3 doesn't support function-local types with generics
+var go118Failures = setOf(
+	"typeparam/nested.go",     // 1.18 compiler doesn't support function-local types with generics
+	"typeparam/issue51521.go", // 1.18 compiler produces bad panic message and link error
 )
 
-// In all of these cases, -G=0 reports reasonable errors, but either -G=0 or types2
-// report extra errors, so we can't match correctly on both. We now set the patterns
-// to match correctly on all the types2 errors.
-var g0Failures = setOf(
+// In all of these cases, the 1.17 compiler reports reasonable errors, but either the
+// 1.17 or 1.18 compiler report extra errors, so we can't match correctly on both. We
+// now set the patterns to match correctly on all the 1.18 errors.
+// This list remains here just as a reference and for comparison - these files all pass.
+var _ = setOf(
 	"import1.go",      // types2 reports extra errors
 	"initializerr.go", // types2 reports extra error
 	"typecheck.go",    // types2 reports extra error at function call
@@ -2186,12 +2021,6 @@
 	"fixedbugs/issue42058b.go", // unified IR doesn't report channel element too large
 	"fixedbugs/issue49767.go",  // unified IR doesn't report channel element too large
 	"fixedbugs/issue49814.go",  // unified IR doesn't report array type too large
-	"typeparam/issue50002.go",  // pure stenciling leads to a static type assertion error
-	"typeparam/typeswitch1.go", // duplicate case failure due to stenciling
-	"typeparam/typeswitch2.go", // duplicate case failure due to stenciling
-	"typeparam/typeswitch3.go", // duplicate case failure due to stenciling
-	"typeparam/typeswitch4.go", // duplicate case failure due to stenciling
-	"typeparam/issue50552.go",  // gives missing method for instantiated type
 )
 
 func setOf(keys ...string) map[string]bool {
@@ -2212,11 +2041,11 @@
 //
 // For example, the following string:
 //
-//     a b:"c d" 'e''f'  "g\""
+//	a b:"c d" 'e''f'  "g\""
 //
 // Would be parsed as:
 //
-//     []string{"a", "b:c d", "ef", `g"`}
+//	[]string{"a", "b:c d", "ef", `g"`}
 //
 // [copied from src/go/build/build.go]
 func splitQuoted(s string) (r []string, err error) {
diff --git a/test/shift3.go b/test/shift3.go
new file mode 100644
index 0000000..bed2fd6
--- /dev/null
+++ b/test/shift3.go
@@ -0,0 +1,41 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that the compiler's noder uses the correct type
+// for RHS shift operands that are untyped. Must compile;
+// run for good measure.
+
+package main
+
+import (
+	"fmt"
+	"math"
+)
+
+func f(x, y int) {
+	if x != y {
+		panic(fmt.Sprintf("%d != %d", x, y))
+	}
+}
+
+func main() {
+	var x int = 1
+	f(x<<1, 2)
+	f(x<<1., 2)
+	f(x<<(1+0i), 2)
+	f(x<<0i, 1)
+
+	f(x<<(1<<x), 4)
+	f(x<<(1.<<x), 4)
+	f(x<<((1+0i)<<x), 4)
+	f(x<<(0i<<x), 1)
+
+	// corner cases
+	const M = math.MaxUint
+	f(x<<(M+0), 0)     // shift by untyped int representable as uint
+	f(x<<(M+0.), 0)    // shift by untyped float representable as uint
+	f(x<<(M+0.+0i), 0) // shift by untyped complex representable as uint
+}
diff --git a/test/sinit_run.go b/test/sinit_run.go
index dcaf338..e01502b 100644
--- a/test/sinit_run.go
+++ b/test/sinit_run.go
@@ -25,7 +25,7 @@
 	}
 	f.Close()
 
-	cmd := exec.Command("go", "tool", "compile", "-o", f.Name(), "-S", "sinit.go")
+	cmd := exec.Command("go", "tool", "compile", "-p=sinit", "-o", f.Name(), "-S", "sinit.go")
 	out, err := cmd.CombinedOutput()
 	os.Remove(f.Name())
 	if err != nil {
diff --git a/test/syntax/composite.go b/test/syntax/composite.go
index f891931..b4e03f3 100644
--- a/test/syntax/composite.go
+++ b/test/syntax/composite.go
@@ -7,5 +7,5 @@
 package main
 
 var a = []int{
-	3 // ERROR "need trailing comma before newline in composite literal|expecting comma or }"
+	3 // ERROR "need trailing comma before newline in composite literal|possibly missing comma or }"
 }
diff --git a/test/typeparam/absdiff.go b/test/typeparam/absdiff.go
index f182283..9c83eff 100644
--- a/test/typeparam/absdiff.go
+++ b/test/typeparam/absdiff.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2020 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/absdiff2.go b/test/typeparam/absdiff2.go
index 443388e..87a1ec6 100644
--- a/test/typeparam/absdiff2.go
+++ b/test/typeparam/absdiff2.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/absdiff3.go b/test/typeparam/absdiff3.go
index 99fa6f1..c85cd1d 100644
--- a/test/typeparam/absdiff3.go
+++ b/test/typeparam/absdiff3.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/absdiffimp.go b/test/typeparam/absdiffimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/absdiffimp.go
+++ b/test/typeparam/absdiffimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/absdiffimp2.dir/main.go b/test/typeparam/absdiffimp2.dir/main.go
index 8eefdbd..1519da0 100644
--- a/test/typeparam/absdiffimp2.dir/main.go
+++ b/test/typeparam/absdiffimp2.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/absdiffimp2.go b/test/typeparam/absdiffimp2.go
index 76930e5..40df49f 100644
--- a/test/typeparam/absdiffimp2.go
+++ b/test/typeparam/absdiffimp2.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/adder.go b/test/typeparam/adder.go
index 79319bd..fbb4925 100644
--- a/test/typeparam/adder.go
+++ b/test/typeparam/adder.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/aliasimp.dir/main.go b/test/typeparam/aliasimp.dir/main.go
index 24ce954..39c29fc 100644
--- a/test/typeparam/aliasimp.dir/main.go
+++ b/test/typeparam/aliasimp.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 type R[T any] struct {
 	F T
diff --git a/test/typeparam/aliasimp.go b/test/typeparam/aliasimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/aliasimp.go
+++ b/test/typeparam/aliasimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/append.go b/test/typeparam/append.go
index 42b542e..6168262 100644
--- a/test/typeparam/append.go
+++ b/test/typeparam/append.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/boundmethod.go b/test/typeparam/boundmethod.go
index a14eb54..510519a 100644
--- a/test/typeparam/boundmethod.go
+++ b/test/typeparam/boundmethod.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/builtins.go b/test/typeparam/builtins.go
index 73dda77..763d720 100644
--- a/test/typeparam/builtins.go
+++ b/test/typeparam/builtins.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2020 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/chans.go b/test/typeparam/chans.go
index c30c21c..d73ce6e 100644
--- a/test/typeparam/chans.go
+++ b/test/typeparam/chans.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/chansimp.dir/main.go b/test/typeparam/chansimp.dir/main.go
index ca27167..a380a3c 100644
--- a/test/typeparam/chansimp.dir/main.go
+++ b/test/typeparam/chansimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"context"
 	"fmt"
 	"runtime"
diff --git a/test/typeparam/chansimp.go b/test/typeparam/chansimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/chansimp.go
+++ b/test/typeparam/chansimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/combine.go b/test/typeparam/combine.go
index 5dfdb78..361708f 100644
--- a/test/typeparam/combine.go
+++ b/test/typeparam/combine.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/cons.go b/test/typeparam/cons.go
index 4750392..733e579 100644
--- a/test/typeparam/cons.go
+++ b/test/typeparam/cons.go
@@ -1,8 +1,8 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
-// lice
+// license that can be found in the LICENSE file.
 
 package main
 
diff --git a/test/typeparam/dedup.dir/b.go b/test/typeparam/dedup.dir/b.go
index ce037e2..8507c64 100644
--- a/test/typeparam/dedup.dir/b.go
+++ b/test/typeparam/dedup.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 func B() {
 	var x int64
diff --git a/test/typeparam/dedup.dir/c.go b/test/typeparam/dedup.dir/c.go
index 11a5d97..a1c950f 100644
--- a/test/typeparam/dedup.dir/c.go
+++ b/test/typeparam/dedup.dir/c.go
@@ -4,7 +4,7 @@
 
 package c
 
-import "a"
+import "./a"
 
 func C() {
 	var x int64
diff --git a/test/typeparam/dedup.dir/main.go b/test/typeparam/dedup.dir/main.go
index dc3ff6f..920591b 100644
--- a/test/typeparam/dedup.dir/main.go
+++ b/test/typeparam/dedup.dir/main.go
@@ -5,8 +5,8 @@
 package main
 
 import (
-	"b"
-	"c"
+	"./b"
+	"./c"
 )
 
 func main() {
diff --git a/test/typeparam/dedup.go b/test/typeparam/dedup.go
index dca4cf3..3b98e03 100644
--- a/test/typeparam/dedup.go
+++ b/test/typeparam/dedup.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/dictionaryCapture-noinline.go b/test/typeparam/dictionaryCapture-noinline.go
index ad5bfa0..4c5e7ec 100644
--- a/test/typeparam/dictionaryCapture-noinline.go
+++ b/test/typeparam/dictionaryCapture-noinline.go
@@ -1,4 +1,4 @@
-// run -gcflags="-G=3 -l"
+// run -gcflags="-l"
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/dictionaryCapture.go b/test/typeparam/dictionaryCapture.go
index 7c79481..b503abb 100644
--- a/test/typeparam/dictionaryCapture.go
+++ b/test/typeparam/dictionaryCapture.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/dottype.go b/test/typeparam/dottype.go
index c9c900c..9f1630d 100644
--- a/test/typeparam/dottype.go
+++ b/test/typeparam/dottype.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/double.go b/test/typeparam/double.go
index 3dbdd1b..fbbe602 100644
--- a/test/typeparam/double.go
+++ b/test/typeparam/double.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/eface.go b/test/typeparam/eface.go
index 1421b7f..05d5503 100644
--- a/test/typeparam/eface.go
+++ b/test/typeparam/eface.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/equal.go b/test/typeparam/equal.go
index a1d3e8a..21e2103 100644
--- a/test/typeparam/equal.go
+++ b/test/typeparam/equal.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/fact.go b/test/typeparam/fact.go
index e19cfe6..3c9a13a 100644
--- a/test/typeparam/fact.go
+++ b/test/typeparam/fact.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/factimp.dir/main.go b/test/typeparam/factimp.dir/main.go
index c223800..75e08da 100644
--- a/test/typeparam/factimp.dir/main.go
+++ b/test/typeparam/factimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/factimp.go b/test/typeparam/factimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/factimp.go
+++ b/test/typeparam/factimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/gencrawler.dir/main.go b/test/typeparam/gencrawler.dir/main.go
index 063de7f..198d117 100644
--- a/test/typeparam/gencrawler.dir/main.go
+++ b/test/typeparam/gencrawler.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 func main() {
 	a.V.Print()
diff --git a/test/typeparam/gencrawler.go b/test/typeparam/gencrawler.go
index 7c268ae..66b5f43 100644
--- a/test/typeparam/gencrawler.go
+++ b/test/typeparam/gencrawler.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/genembed.go b/test/typeparam/genembed.go
index 43ab3d6..6a11be1 100644
--- a/test/typeparam/genembed.go
+++ b/test/typeparam/genembed.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/genembed2.go b/test/typeparam/genembed2.go
index 6effd2e..f75731f 100644
--- a/test/typeparam/genembed2.go
+++ b/test/typeparam/genembed2.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/geninline.dir/main.go b/test/typeparam/geninline.dir/main.go
index 6dc36ba..cfc4885 100644
--- a/test/typeparam/geninline.dir/main.go
+++ b/test/typeparam/geninline.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 // Testing inlining of functions that refer to instantiated exported and non-exported
 // generic types.
diff --git a/test/typeparam/geninline.go b/test/typeparam/geninline.go
index 76930e5..40df49f 100644
--- a/test/typeparam/geninline.go
+++ b/test/typeparam/geninline.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/graph.go b/test/typeparam/graph.go
index cecf349..38a97bc 100644
--- a/test/typeparam/graph.go
+++ b/test/typeparam/graph.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/ifaceconv.go b/test/typeparam/ifaceconv.go
index ee3a9e0..4dfc68f 100644
--- a/test/typeparam/ifaceconv.go
+++ b/test/typeparam/ifaceconv.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/importtest.go b/test/typeparam/importtest.go
index 9cb30e8..a49dcd9 100644
--- a/test/typeparam/importtest.go
+++ b/test/typeparam/importtest.go
@@ -1,4 +1,4 @@
-// compile -G
+// compile
 
 // Copyright 2020 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/index.go b/test/typeparam/index.go
index 906f76d..064d33c 100644
--- a/test/typeparam/index.go
+++ b/test/typeparam/index.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/index2.go b/test/typeparam/index2.go
index 683b76f..ae1b44a 100644
--- a/test/typeparam/index2.go
+++ b/test/typeparam/index2.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/interfacearg.go b/test/typeparam/interfacearg.go
index 28ea3e3..0e1fd00 100644
--- a/test/typeparam/interfacearg.go
+++ b/test/typeparam/interfacearg.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue23536.go b/test/typeparam/issue23536.go
index a4f0618..1d6d79b 100644
--- a/test/typeparam/issue23536.go
+++ b/test/typeparam/issue23536.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue376214.go b/test/typeparam/issue376214.go
index 8f94f41..269b684 100644
--- a/test/typeparam/issue376214.go
+++ b/test/typeparam/issue376214.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue39755.go b/test/typeparam/issue39755.go
index c4b6902..52c7e7c 100644
--- a/test/typeparam/issue39755.go
+++ b/test/typeparam/issue39755.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2020 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue42758.go b/test/typeparam/issue42758.go
new file mode 100644
index 0000000..25fb85f
--- /dev/null
+++ b/test/typeparam/issue42758.go
@@ -0,0 +1,19 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func F[T, U int]() interface{} {
+	switch interface{}(nil) {
+	case int(0), T(0), U(0):
+	}
+
+	return map[interface{}]int{int(0): 0, T(0): 0, U(0): 0}
+}
+
+func main() {
+	F[int, int]()
+}
diff --git a/test/typeparam/issue44688.go b/test/typeparam/issue44688.go
index 9826069..48160e0 100644
--- a/test/typeparam/issue44688.go
+++ b/test/typeparam/issue44688.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue45547.go b/test/typeparam/issue45547.go
index b354d4d..0024f36 100644
--- a/test/typeparam/issue45547.go
+++ b/test/typeparam/issue45547.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue45722.go b/test/typeparam/issue45722.go
index 0d7c20c..52a3c63 100644
--- a/test/typeparam/issue45722.go
+++ b/test/typeparam/issue45722.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue45738.go b/test/typeparam/issue45738.go
index 9f03e79..89b3b11 100644
--- a/test/typeparam/issue45738.go
+++ b/test/typeparam/issue45738.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue45817.go b/test/typeparam/issue45817.go
index 1efee3b..78e472f 100644
--- a/test/typeparam/issue45817.go
+++ b/test/typeparam/issue45817.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue46461.go b/test/typeparam/issue46461.go
index 8fdec1c..4d4d440 100644
--- a/test/typeparam/issue46461.go
+++ b/test/typeparam/issue46461.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3
+// errorcheck
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue46461b.go b/test/typeparam/issue46461b.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/issue46461b.go
+++ b/test/typeparam/issue46461b.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue46472.go b/test/typeparam/issue46472.go
index cd4d923..027a8aa 100644
--- a/test/typeparam/issue46472.go
+++ b/test/typeparam/issue46472.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue46591.go b/test/typeparam/issue46591.go
index e7b9fa2..9e2c31d 100644
--- a/test/typeparam/issue46591.go
+++ b/test/typeparam/issue46591.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47258.go b/test/typeparam/issue47258.go
index 7173294..7b202c9 100644
--- a/test/typeparam/issue47258.go
+++ b/test/typeparam/issue47258.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47272.go b/test/typeparam/issue47272.go
index 6771cb9..79748ad 100644
--- a/test/typeparam/issue47272.go
+++ b/test/typeparam/issue47272.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47514.go b/test/typeparam/issue47514.go
index 947f254..1fc054e 100644
--- a/test/typeparam/issue47514.go
+++ b/test/typeparam/issue47514.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47514b.go b/test/typeparam/issue47514b.go
index 5428a0e..0609296 100644
--- a/test/typeparam/issue47514b.go
+++ b/test/typeparam/issue47514b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47514c.dir/main.go b/test/typeparam/issue47514c.dir/main.go
index bc1166f..0ef423f 100644
--- a/test/typeparam/issue47514c.dir/main.go
+++ b/test/typeparam/issue47514c.dir/main.go
@@ -1,6 +1,6 @@
 package main
 
-import "a"
+import "./a"
 
 func Do[T any](doer a.Doer[T]) {
 	doer.Do()
diff --git a/test/typeparam/issue47514c.go b/test/typeparam/issue47514c.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue47514c.go
+++ b/test/typeparam/issue47514c.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47631.go b/test/typeparam/issue47631.go
index 7f7cfa6..c2ce951 100644
--- a/test/typeparam/issue47631.go
+++ b/test/typeparam/issue47631.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3
+// errorcheck
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47676.go b/test/typeparam/issue47676.go
index 1b01624..8569378 100644
--- a/test/typeparam/issue47676.go
+++ b/test/typeparam/issue47676.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47684.go b/test/typeparam/issue47684.go
index 2798b78..f0e4ed0 100644
--- a/test/typeparam/issue47684.go
+++ b/test/typeparam/issue47684.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47684b.go b/test/typeparam/issue47684b.go
index c43ef8d..3e9fa93 100644
--- a/test/typeparam/issue47684b.go
+++ b/test/typeparam/issue47684b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47684c.go b/test/typeparam/issue47684c.go
index 32f1b66..b1d4520 100644
--- a/test/typeparam/issue47684c.go
+++ b/test/typeparam/issue47684c.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47708.go b/test/typeparam/issue47708.go
index 35d57c8..d6140f3 100644
--- a/test/typeparam/issue47708.go
+++ b/test/typeparam/issue47708.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47710.go b/test/typeparam/issue47710.go
index 0882cb4..2263c8b 100644
--- a/test/typeparam/issue47710.go
+++ b/test/typeparam/issue47710.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47713.go b/test/typeparam/issue47713.go
index a38eea1..7e3b5a5 100644
--- a/test/typeparam/issue47713.go
+++ b/test/typeparam/issue47713.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47716.go b/test/typeparam/issue47716.go
index 7f34fcb..5024ac9 100644
--- a/test/typeparam/issue47716.go
+++ b/test/typeparam/issue47716.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47723.go b/test/typeparam/issue47723.go
index 9ef6040..44c55b6 100644
--- a/test/typeparam/issue47723.go
+++ b/test/typeparam/issue47723.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47740.go b/test/typeparam/issue47740.go
index ea1168f..f34394c 100644
--- a/test/typeparam/issue47740.go
+++ b/test/typeparam/issue47740.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47740b.go b/test/typeparam/issue47740b.go
index 2a91d35..d46d058 100644
--- a/test/typeparam/issue47740b.go
+++ b/test/typeparam/issue47740b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47775.dir/main.go b/test/typeparam/issue47775.dir/main.go
index ed284dd..5ec85a4 100644
--- a/test/typeparam/issue47775.dir/main.go
+++ b/test/typeparam/issue47775.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "b"
+import "./b"
 
 func main() {
 	b.New[int]()
diff --git a/test/typeparam/issue47775.go b/test/typeparam/issue47775.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue47775.go
+++ b/test/typeparam/issue47775.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47775b.go b/test/typeparam/issue47775b.go
index 6d3fc8d..e084e03 100644
--- a/test/typeparam/issue47775b.go
+++ b/test/typeparam/issue47775b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47797.go b/test/typeparam/issue47797.go
index 3e80d3c..ad89bcc 100644
--- a/test/typeparam/issue47797.go
+++ b/test/typeparam/issue47797.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47877.go b/test/typeparam/issue47877.go
index 0a83459..be5c5c0 100644
--- a/test/typeparam/issue47877.go
+++ b/test/typeparam/issue47877.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47878.go b/test/typeparam/issue47878.go
index 6ad183d..25758cb 100644
--- a/test/typeparam/issue47878.go
+++ b/test/typeparam/issue47878.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47892.dir/main.go b/test/typeparam/issue47892.dir/main.go
index bd610d4..348e38b 100644
--- a/test/typeparam/issue47892.dir/main.go
+++ b/test/typeparam/issue47892.dir/main.go
@@ -4,15 +4,15 @@
 
 package main
 
-import "a"
+import "./a"
 
 type Model[T any] struct {
-	index       a.Index[T]
+	index a.Index[T]
 }
 
 func NewModel[T any](index a.Index[T]) Model[T] {
 	return Model[T]{
-		index:       index,
+		index: index,
 	}
 }
 
diff --git a/test/typeparam/issue47892.go b/test/typeparam/issue47892.go
index 572f680..5bb6a74 100644
--- a/test/typeparam/issue47892.go
+++ b/test/typeparam/issue47892.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47892b.dir/main.go b/test/typeparam/issue47892b.dir/main.go
index 70df440..3cd658f 100644
--- a/test/typeparam/issue47892b.dir/main.go
+++ b/test/typeparam/issue47892b.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 type S[Idx any] struct {
 	A string
diff --git a/test/typeparam/issue47892b.go b/test/typeparam/issue47892b.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/issue47892b.go
+++ b/test/typeparam/issue47892b.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47896.go b/test/typeparam/issue47896.go
index 1b2f265..616e907 100644
--- a/test/typeparam/issue47896.go
+++ b/test/typeparam/issue47896.go
@@ -1,4 +1,4 @@
-//  compile -G=3
+//  compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47901.go b/test/typeparam/issue47901.go
index cd07973..e005135 100644
--- a/test/typeparam/issue47901.go
+++ b/test/typeparam/issue47901.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47924.go b/test/typeparam/issue47924.go
index 1d1bab3..eea7acb 100644
--- a/test/typeparam/issue47924.go
+++ b/test/typeparam/issue47924.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47925.go b/test/typeparam/issue47925.go
index 1b07193..c595e14 100644
--- a/test/typeparam/issue47925.go
+++ b/test/typeparam/issue47925.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47925b.go b/test/typeparam/issue47925b.go
index f4a99ec..bffbe4e 100644
--- a/test/typeparam/issue47925b.go
+++ b/test/typeparam/issue47925b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47925c.go b/test/typeparam/issue47925c.go
index 0ba23e6..9636b9d 100644
--- a/test/typeparam/issue47925c.go
+++ b/test/typeparam/issue47925c.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47925d.go b/test/typeparam/issue47925d.go
index 231961b..c5647f9 100644
--- a/test/typeparam/issue47925d.go
+++ b/test/typeparam/issue47925d.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47929.go b/test/typeparam/issue47929.go
index a5636f2..1aa6885 100644
--- a/test/typeparam/issue47929.go
+++ b/test/typeparam/issue47929.go
@@ -1,4 +1,4 @@
-// compile -G=3 -p=p
+// compile -p=p
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47948.go b/test/typeparam/issue47948.go
index 8e5df81..deab0ef 100644
--- a/test/typeparam/issue47948.go
+++ b/test/typeparam/issue47948.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue47966.go b/test/typeparam/issue47966.go
index f431f7f..ec66478 100644
--- a/test/typeparam/issue47966.go
+++ b/test/typeparam/issue47966.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48013.go b/test/typeparam/issue48013.go
index 179d9f4..3fbf249 100644
--- a/test/typeparam/issue48013.go
+++ b/test/typeparam/issue48013.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48016.go b/test/typeparam/issue48016.go
index 582751e..dbc87ec 100644
--- a/test/typeparam/issue48016.go
+++ b/test/typeparam/issue48016.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48030.go b/test/typeparam/issue48030.go
index 9fc4428..23494f9 100644
--- a/test/typeparam/issue48030.go
+++ b/test/typeparam/issue48030.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48042.go b/test/typeparam/issue48042.go
index db5de3d..1cfbfbe 100644
--- a/test/typeparam/issue48042.go
+++ b/test/typeparam/issue48042.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48047.go b/test/typeparam/issue48047.go
index 1bff65a..06a2ebd 100644
--- a/test/typeparam/issue48047.go
+++ b/test/typeparam/issue48047.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48049.go b/test/typeparam/issue48049.go
index 3a00514..3e87b38 100644
--- a/test/typeparam/issue48049.go
+++ b/test/typeparam/issue48049.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48056.go b/test/typeparam/issue48056.go
index 8d1c3ef..e91d689 100644
--- a/test/typeparam/issue48056.go
+++ b/test/typeparam/issue48056.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48094.dir/main.go b/test/typeparam/issue48094.dir/main.go
index eb1ddbe..78337da 100644
--- a/test/typeparam/issue48094.dir/main.go
+++ b/test/typeparam/issue48094.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 func main() {
 	if a.F[int64]() != 8 {
diff --git a/test/typeparam/issue48094.go b/test/typeparam/issue48094.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue48094.go
+++ b/test/typeparam/issue48094.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48094b.go b/test/typeparam/issue48094b.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/issue48094b.go
+++ b/test/typeparam/issue48094b.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48137.go b/test/typeparam/issue48137.go
index 3dd7810..84a0f6d 100644
--- a/test/typeparam/issue48137.go
+++ b/test/typeparam/issue48137.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48185a.dir/p_test.go b/test/typeparam/issue48185a.dir/p_test.go
index 52c87a7..a89d697 100644
--- a/test/typeparam/issue48185a.dir/p_test.go
+++ b/test/typeparam/issue48185a.dir/p_test.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "p"
+import "./p"
 
 func main() {
 	_ = p.MarshalFuncV1[int](func(int) ([]byte, error) { return nil, nil })
diff --git a/test/typeparam/issue48185b.dir/main.go b/test/typeparam/issue48185b.dir/main.go
index 978e6ae..ea157f7 100644
--- a/test/typeparam/issue48185b.dir/main.go
+++ b/test/typeparam/issue48185b.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/issue48185b.go b/test/typeparam/issue48185b.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue48185b.go
+++ b/test/typeparam/issue48185b.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48191.go b/test/typeparam/issue48191.go
index 967004d..9c3218b 100644
--- a/test/typeparam/issue48191.go
+++ b/test/typeparam/issue48191.go
@@ -1,4 +1,4 @@
-// compile -c=2 -G=3
+// compile -c=2
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48198.go b/test/typeparam/issue48198.go
index 1d7e44e..1ed29b8 100644
--- a/test/typeparam/issue48198.go
+++ b/test/typeparam/issue48198.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48225.go b/test/typeparam/issue48225.go
index 887ffd8..702bc07 100644
--- a/test/typeparam/issue48225.go
+++ b/test/typeparam/issue48225.go
@@ -1,4 +1,4 @@
-// run -gcflags="-G=3"
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48253.go b/test/typeparam/issue48253.go
index 7bd0234..20d5db6 100644
--- a/test/typeparam/issue48253.go
+++ b/test/typeparam/issue48253.go
@@ -1,4 +1,4 @@
-// run -gcflags="-G=3"
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48276a.go b/test/typeparam/issue48276a.go
index 25e939f..2a79268 100644
--- a/test/typeparam/issue48276a.go
+++ b/test/typeparam/issue48276a.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48276b.go b/test/typeparam/issue48276b.go
index 67c3e3d..774898d 100644
--- a/test/typeparam/issue48276b.go
+++ b/test/typeparam/issue48276b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48280.dir/main.go b/test/typeparam/issue48280.dir/main.go
index b9981c6..2c8387d 100644
--- a/test/typeparam/issue48280.dir/main.go
+++ b/test/typeparam/issue48280.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 func main() {
 	_ = a.S{}
diff --git a/test/typeparam/issue48280.go b/test/typeparam/issue48280.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue48280.go
+++ b/test/typeparam/issue48280.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48306.dir/main.go b/test/typeparam/issue48306.dir/main.go
index 5d602fe..260c3c8 100644
--- a/test/typeparam/issue48306.dir/main.go
+++ b/test/typeparam/issue48306.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 type S struct{}
 
diff --git a/test/typeparam/issue48306.go b/test/typeparam/issue48306.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue48306.go
+++ b/test/typeparam/issue48306.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48317.go b/test/typeparam/issue48317.go
index c8f088d..0220360 100644
--- a/test/typeparam/issue48317.go
+++ b/test/typeparam/issue48317.go
@@ -1,4 +1,4 @@
-// run -gcflags="-G=3"
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48318.go b/test/typeparam/issue48318.go
index ae53a28..b75c520 100644
--- a/test/typeparam/issue48318.go
+++ b/test/typeparam/issue48318.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48337a.dir/main.go b/test/typeparam/issue48337a.dir/main.go
index 16f7115..ddf6724 100644
--- a/test/typeparam/issue48337a.dir/main.go
+++ b/test/typeparam/issue48337a.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 func main() {
 	obj := a.NewWrapperWithLock("this file does import sync")
diff --git a/test/typeparam/issue48337a.go b/test/typeparam/issue48337a.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue48337a.go
+++ b/test/typeparam/issue48337a.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48337b.dir/main.go b/test/typeparam/issue48337b.dir/main.go
index 0b2814c..0318b67 100644
--- a/test/typeparam/issue48337b.dir/main.go
+++ b/test/typeparam/issue48337b.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 func main() {
 	a.NewMetaContainer()
diff --git a/test/typeparam/issue48337b.go b/test/typeparam/issue48337b.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue48337b.go
+++ b/test/typeparam/issue48337b.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48344.go b/test/typeparam/issue48344.go
index 7ea539c..220bce9 100644
--- a/test/typeparam/issue48344.go
+++ b/test/typeparam/issue48344.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48424.go b/test/typeparam/issue48424.go
index 8d80911..c5e5d4b 100644
--- a/test/typeparam/issue48424.go
+++ b/test/typeparam/issue48424.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48453.go b/test/typeparam/issue48453.go
index 0f751d3..ef8c7f7 100644
--- a/test/typeparam/issue48453.go
+++ b/test/typeparam/issue48453.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48454.dir/b.go b/test/typeparam/issue48454.dir/b.go
index 2b59b71..deb59d2 100644
--- a/test/typeparam/issue48454.dir/b.go
+++ b/test/typeparam/issue48454.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 type Session struct {
 	privateField a.Val[string]
diff --git a/test/typeparam/issue48454.dir/main.go b/test/typeparam/issue48454.dir/main.go
index becb5f3..ad9d290 100644
--- a/test/typeparam/issue48454.dir/main.go
+++ b/test/typeparam/issue48454.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "b"
+import "./b"
 
 func main() {
 	var _ b.Session
diff --git a/test/typeparam/issue48454.go b/test/typeparam/issue48454.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue48454.go
+++ b/test/typeparam/issue48454.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48462.dir/main.go b/test/typeparam/issue48462.dir/main.go
index 8054ddd..e615367 100644
--- a/test/typeparam/issue48462.dir/main.go
+++ b/test/typeparam/issue48462.dir/main.go
@@ -8,7 +8,7 @@
 	"fmt"
 	"reflect"
 
-	"a"
+	"./a"
 )
 
 func main() {
diff --git a/test/typeparam/issue48462.go b/test/typeparam/issue48462.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue48462.go
+++ b/test/typeparam/issue48462.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48537.go b/test/typeparam/issue48537.go
index a2dc5cf..3ae85c7 100644
--- a/test/typeparam/issue48537.go
+++ b/test/typeparam/issue48537.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48538.go b/test/typeparam/issue48538.go
index fed9b5e..985f84e 100644
--- a/test/typeparam/issue48538.go
+++ b/test/typeparam/issue48538.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48598.go b/test/typeparam/issue48598.go
index ea360f2..945b332 100644
--- a/test/typeparam/issue48598.go
+++ b/test/typeparam/issue48598.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48602.go b/test/typeparam/issue48602.go
index 53ce20e..c544697 100644
--- a/test/typeparam/issue48602.go
+++ b/test/typeparam/issue48602.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48604.go b/test/typeparam/issue48604.go
index 1babd3f..348abf7 100644
--- a/test/typeparam/issue48604.go
+++ b/test/typeparam/issue48604.go
@@ -1,4 +1,4 @@
-// build -gcflags=-G=3
+// build
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48609.go b/test/typeparam/issue48609.go
index 6cf6908..53144d2 100644
--- a/test/typeparam/issue48609.go
+++ b/test/typeparam/issue48609.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48617.go b/test/typeparam/issue48617.go
index 4b00570..96978d4 100644
--- a/test/typeparam/issue48617.go
+++ b/test/typeparam/issue48617.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48645a.go b/test/typeparam/issue48645a.go
index 8d5aac9..39267a9 100644
--- a/test/typeparam/issue48645a.go
+++ b/test/typeparam/issue48645a.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48645b.go b/test/typeparam/issue48645b.go
index 0f3a7f2..619e7ee 100644
--- a/test/typeparam/issue48645b.go
+++ b/test/typeparam/issue48645b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48711.go b/test/typeparam/issue48711.go
index d09a72e..477a5d5 100644
--- a/test/typeparam/issue48711.go
+++ b/test/typeparam/issue48711.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3
+// errorcheck
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48716.dir/main.go b/test/typeparam/issue48716.dir/main.go
index adde0f5..13a126e 100644
--- a/test/typeparam/issue48716.dir/main.go
+++ b/test/typeparam/issue48716.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 )
 
 // Creates copy of set
diff --git a/test/typeparam/issue48716.go b/test/typeparam/issue48716.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue48716.go
+++ b/test/typeparam/issue48716.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48838.go b/test/typeparam/issue48838.go
index ef2150d..1711d04 100644
--- a/test/typeparam/issue48838.go
+++ b/test/typeparam/issue48838.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue48962.dir/b.go b/test/typeparam/issue48962.dir/b.go
index a49f55d..e4eaa06 100644
--- a/test/typeparam/issue48962.dir/b.go
+++ b/test/typeparam/issue48962.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 type (
 	lA[P any]               [10]P
diff --git a/test/typeparam/issue48962.go b/test/typeparam/issue48962.go
index 326d67b..24d0eb0 100644
--- a/test/typeparam/issue48962.go
+++ b/test/typeparam/issue48962.go
@@ -1,4 +1,4 @@
-// errorcheckdir -G=3
+// errorcheckdir
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49027.dir/main.go b/test/typeparam/issue49027.dir/main.go
index aa20a2f..d998c5b 100644
--- a/test/typeparam/issue49027.dir/main.go
+++ b/test/typeparam/issue49027.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/issue49027.go b/test/typeparam/issue49027.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue49027.go
+++ b/test/typeparam/issue49027.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49049.go b/test/typeparam/issue49049.go
index f4fdd05..b4b3bae 100644
--- a/test/typeparam/issue49049.go
+++ b/test/typeparam/issue49049.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49241.dir/b.go b/test/typeparam/issue49241.dir/b.go
index 45c1afb..e5f1e12 100644
--- a/test/typeparam/issue49241.dir/b.go
+++ b/test/typeparam/issue49241.dir/b.go
@@ -4,14 +4,14 @@
 
 package b
 
-import "a"
+import "./a"
 
 //go:noinline
-func F() interface {} {
+func F() interface{} {
 	return a.T[int]{}
 }
 
 //go:noinline
 func G() interface{} {
-	return struct{X,Y a.U}{}
+	return struct{ X, Y a.U }{}
 }
diff --git a/test/typeparam/issue49241.dir/c.go b/test/typeparam/issue49241.dir/c.go
index ea3bab2..34ea7c3 100644
--- a/test/typeparam/issue49241.dir/c.go
+++ b/test/typeparam/issue49241.dir/c.go
@@ -4,14 +4,14 @@
 
 package c
 
-import "a"
+import "./a"
 
 //go:noinline
-func F() interface {} {
+func F() interface{} {
 	return a.T[int]{}
 }
 
 //go:noinline
 func G() interface{} {
-	return struct{X,Y a.U}{}
+	return struct{ X, Y a.U }{}
 }
diff --git a/test/typeparam/issue49241.dir/main.go b/test/typeparam/issue49241.dir/main.go
index 7c8a8b1..58bb8a0 100644
--- a/test/typeparam/issue49241.dir/main.go
+++ b/test/typeparam/issue49241.dir/main.go
@@ -5,8 +5,8 @@
 package main
 
 import (
-	"b"
-	"c"
+	"./b"
+	"./c"
 )
 
 func main() {
diff --git a/test/typeparam/issue49241.go b/test/typeparam/issue49241.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue49241.go
+++ b/test/typeparam/issue49241.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49246.go b/test/typeparam/issue49246.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/issue49246.go
+++ b/test/typeparam/issue49246.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49295.go b/test/typeparam/issue49295.go
index 435b44d..f96c896 100644
--- a/test/typeparam/issue49295.go
+++ b/test/typeparam/issue49295.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49309.go b/test/typeparam/issue49309.go
index 36da86a..265e0bf 100644
--- a/test/typeparam/issue49309.go
+++ b/test/typeparam/issue49309.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49421.go b/test/typeparam/issue49421.go
index 526e038..65c32af 100644
--- a/test/typeparam/issue49421.go
+++ b/test/typeparam/issue49421.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49432.go b/test/typeparam/issue49432.go
index 21d6ec4..d522b22 100644
--- a/test/typeparam/issue49432.go
+++ b/test/typeparam/issue49432.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49497.dir/main.go b/test/typeparam/issue49497.dir/main.go
index 3725e55..e74dae0 100644
--- a/test/typeparam/issue49497.dir/main.go
+++ b/test/typeparam/issue49497.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 func main() {
 	a.F[string]()
diff --git a/test/typeparam/issue49497.go b/test/typeparam/issue49497.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue49497.go
+++ b/test/typeparam/issue49497.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49516.go b/test/typeparam/issue49516.go
index d6fab02..11b460d 100644
--- a/test/typeparam/issue49516.go
+++ b/test/typeparam/issue49516.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49524.dir/main.go b/test/typeparam/issue49524.dir/main.go
index ef00c8a..8787e7e 100644
--- a/test/typeparam/issue49524.dir/main.go
+++ b/test/typeparam/issue49524.dir/main.go
@@ -4,7 +4,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-import "a"
+import "./a"
 
 func main() {
 	a.F[int]()
diff --git a/test/typeparam/issue49524.go b/test/typeparam/issue49524.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue49524.go
+++ b/test/typeparam/issue49524.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49536.dir/a.go b/test/typeparam/issue49536.dir/a.go
new file mode 100644
index 0000000..a95ad60
--- /dev/null
+++ b/test/typeparam/issue49536.dir/a.go
@@ -0,0 +1,12 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+func F() interface{} { return new(T[int]) }
+
+type T[P any] int
+
+func (x *T[P]) One() int { return x.Two() }
+func (x *T[P]) Two() int { return 0 }
diff --git a/test/typeparam/issue49536.dir/b.go b/test/typeparam/issue49536.dir/b.go
new file mode 100644
index 0000000..b08a77b
--- /dev/null
+++ b/test/typeparam/issue49536.dir/b.go
@@ -0,0 +1,9 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package b
+
+import "./a"
+
+var _ = a.F()
diff --git a/test/typeparam/issue49536.go b/test/typeparam/issue49536.go
new file mode 100644
index 0000000..8bb5c3e
--- /dev/null
+++ b/test/typeparam/issue49536.go
@@ -0,0 +1,7 @@
+// compiledir
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/typeparam/issue49538.go b/test/typeparam/issue49538.go
index ac20a54..cb22a06 100644
--- a/test/typeparam/issue49538.go
+++ b/test/typeparam/issue49538.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49547.go b/test/typeparam/issue49547.go
index 99c124d..6d359ba 100644
--- a/test/typeparam/issue49547.go
+++ b/test/typeparam/issue49547.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49611.go b/test/typeparam/issue49611.go
index 96c651e..879e4d2 100644
--- a/test/typeparam/issue49611.go
+++ b/test/typeparam/issue49611.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49659.dir/b.go b/test/typeparam/issue49659.dir/b.go
index 1f37153..4818a42 100644
--- a/test/typeparam/issue49659.dir/b.go
+++ b/test/typeparam/issue49659.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 type B[T any] struct {
 	v a.A[T]
diff --git a/test/typeparam/issue49659.go b/test/typeparam/issue49659.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/issue49659.go
+++ b/test/typeparam/issue49659.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49659b.go b/test/typeparam/issue49659b.go
index a9a14af..7e1535e 100644
--- a/test/typeparam/issue49659b.go
+++ b/test/typeparam/issue49659b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49667.dir/b.go b/test/typeparam/issue49667.dir/b.go
index e7f781e..81cdb80 100644
--- a/test/typeparam/issue49667.dir/b.go
+++ b/test/typeparam/issue49667.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 type B[T any] struct {
 	_ a.A[T]
diff --git a/test/typeparam/issue49667.dir/main.go b/test/typeparam/issue49667.dir/main.go
index fccefe0..f9fa60f 100644
--- a/test/typeparam/issue49667.dir/main.go
+++ b/test/typeparam/issue49667.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "b"
+import "./b"
 
 func main() {
 	var _ b.B[int]
diff --git a/test/typeparam/issue49667.go b/test/typeparam/issue49667.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue49667.go
+++ b/test/typeparam/issue49667.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49875.go b/test/typeparam/issue49875.go
index aece7de..3fbe48c 100644
--- a/test/typeparam/issue49875.go
+++ b/test/typeparam/issue49875.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue49893.dir/b.go b/test/typeparam/issue49893.dir/b.go
index b36f6bd..b86b536 100644
--- a/test/typeparam/issue49893.dir/b.go
+++ b/test/typeparam/issue49893.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 type Ap1[A, B any] struct {
 	opt a.Option[A]
diff --git a/test/typeparam/issue49893.dir/main.go b/test/typeparam/issue49893.dir/main.go
index 8b5b3bd..447212d 100644
--- a/test/typeparam/issue49893.dir/main.go
+++ b/test/typeparam/issue49893.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"b"
+	"./b"
 	"fmt"
 )
 
diff --git a/test/typeparam/issue49893.go b/test/typeparam/issue49893.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/issue49893.go
+++ b/test/typeparam/issue49893.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50002.go b/test/typeparam/issue50002.go
index 670fc2e..42d97f5 100644
--- a/test/typeparam/issue50002.go
+++ b/test/typeparam/issue50002.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50109.go b/test/typeparam/issue50109.go
index a6913df..30aebb2 100644
--- a/test/typeparam/issue50109.go
+++ b/test/typeparam/issue50109.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50109b.go b/test/typeparam/issue50109b.go
index 1d89efc..ee49441 100644
--- a/test/typeparam/issue50109b.go
+++ b/test/typeparam/issue50109b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50121.dir/main.go b/test/typeparam/issue50121.dir/main.go
index 71eb44f..3978ef4 100644
--- a/test/typeparam/issue50121.dir/main.go
+++ b/test/typeparam/issue50121.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 )
 
 //go:noinline
diff --git a/test/typeparam/issue50121.go b/test/typeparam/issue50121.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue50121.go
+++ b/test/typeparam/issue50121.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50121b.dir/b.go b/test/typeparam/issue50121b.dir/b.go
index 20f9b38..efa6cbb 100644
--- a/test/typeparam/issue50121b.dir/b.go
+++ b/test/typeparam/issue50121b.dir/b.go
@@ -5,7 +5,7 @@
 package b
 
 import (
-	"a"
+	"./a"
 )
 
 var IntBuilder = a.Builder[int]{}
diff --git a/test/typeparam/issue50121b.dir/c.go b/test/typeparam/issue50121b.dir/c.go
index ee9ff9f..1691356 100644
--- a/test/typeparam/issue50121b.dir/c.go
+++ b/test/typeparam/issue50121b.dir/c.go
@@ -5,7 +5,7 @@
 package c
 
 import (
-	"b"
+	"./b"
 )
 
 func BuildInt() int {
diff --git a/test/typeparam/issue50121b.dir/d.go b/test/typeparam/issue50121b.dir/d.go
index 3020381..93b40c9 100644
--- a/test/typeparam/issue50121b.dir/d.go
+++ b/test/typeparam/issue50121b.dir/d.go
@@ -5,7 +5,7 @@
 package d
 
 import (
-	"c"
+	"./c"
 )
 
 func BuildInt() int {
diff --git a/test/typeparam/issue50121b.dir/main.go b/test/typeparam/issue50121b.dir/main.go
index 4b6ae41..3398601 100644
--- a/test/typeparam/issue50121b.dir/main.go
+++ b/test/typeparam/issue50121b.dir/main.go
@@ -1,7 +1,7 @@
 package main
 
 import (
-	"d"
+	"./d"
 	"fmt"
 )
 
diff --git a/test/typeparam/issue50121b.go b/test/typeparam/issue50121b.go
index 76930e5..40df49f 100644
--- a/test/typeparam/issue50121b.go
+++ b/test/typeparam/issue50121b.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50147.go b/test/typeparam/issue50147.go
index 2bdce6c..f97bace 100644
--- a/test/typeparam/issue50147.go
+++ b/test/typeparam/issue50147.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50177.go b/test/typeparam/issue50177.go
index 5fd62ad..c4858fc 100644
--- a/test/typeparam/issue50177.go
+++ b/test/typeparam/issue50177.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50193.go b/test/typeparam/issue50193.go
index 76de588..8b4b841 100644
--- a/test/typeparam/issue50193.go
+++ b/test/typeparam/issue50193.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50259.go b/test/typeparam/issue50259.go
index 59611ef..50edf8f 100644
--- a/test/typeparam/issue50259.go
+++ b/test/typeparam/issue50259.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50264.go b/test/typeparam/issue50264.go
index ee3eedc..1acab87 100644
--- a/test/typeparam/issue50264.go
+++ b/test/typeparam/issue50264.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50317.go b/test/typeparam/issue50317.go
index df879c1..c33c4f0 100644
--- a/test/typeparam/issue50317.go
+++ b/test/typeparam/issue50317.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3
+// errorcheck
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50417.go b/test/typeparam/issue50417.go
index e93583f..b32e270 100644
--- a/test/typeparam/issue50417.go
+++ b/test/typeparam/issue50417.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50417b.go b/test/typeparam/issue50417b.go
index 86e1f8a..1c803b0 100644
--- a/test/typeparam/issue50417b.go
+++ b/test/typeparam/issue50417b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50419.go b/test/typeparam/issue50419.go
index ff9d08d..dfe55f9 100644
--- a/test/typeparam/issue50419.go
+++ b/test/typeparam/issue50419.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50437.go b/test/typeparam/issue50437.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/issue50437.go
+++ b/test/typeparam/issue50437.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50481b.dir/main.go b/test/typeparam/issue50481b.dir/main.go
index 909d6e4..6a5067c 100644
--- a/test/typeparam/issue50481b.dir/main.go
+++ b/test/typeparam/issue50481b.dir/main.go
@@ -8,7 +8,7 @@
 package main
 
 import (
-	"b"
+	"./b"
 	"fmt"
 )
 
diff --git a/test/typeparam/issue50481b.go b/test/typeparam/issue50481b.go
index 642f4bf..aefbe67 100644
--- a/test/typeparam/issue50481b.go
+++ b/test/typeparam/issue50481b.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50481c.dir/main.go b/test/typeparam/issue50481c.dir/main.go
index 4661976..178542b 100644
--- a/test/typeparam/issue50481c.dir/main.go
+++ b/test/typeparam/issue50481c.dir/main.go
@@ -8,7 +8,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/issue50481c.go b/test/typeparam/issue50481c.go
index 642f4bf..aefbe67 100644
--- a/test/typeparam/issue50481c.go
+++ b/test/typeparam/issue50481c.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50485.dir/main.go b/test/typeparam/issue50485.dir/main.go
index 88a765b..7181b93 100644
--- a/test/typeparam/issue50485.dir/main.go
+++ b/test/typeparam/issue50485.dir/main.go
@@ -1,7 +1,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 )
 
 func main() {
diff --git a/test/typeparam/issue50485.go b/test/typeparam/issue50485.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/issue50485.go
+++ b/test/typeparam/issue50485.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50486.dir/main.go b/test/typeparam/issue50486.dir/main.go
index db5f1c3..c2c8eea 100644
--- a/test/typeparam/issue50486.dir/main.go
+++ b/test/typeparam/issue50486.dir/main.go
@@ -1,6 +1,6 @@
 package main
 
-import fp "goerror_fp"
+import fp "./goerror_fp"
 
 func Fold[A, B any](zero B, a A, f func(B, A) B) B {
 	return f(zero, a)
diff --git a/test/typeparam/issue50486.go b/test/typeparam/issue50486.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/issue50486.go
+++ b/test/typeparam/issue50486.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50552.dir/main.go b/test/typeparam/issue50552.dir/main.go
index 047c27e..0ff2ed3 100644
--- a/test/typeparam/issue50552.dir/main.go
+++ b/test/typeparam/issue50552.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/issue50552.go b/test/typeparam/issue50552.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/issue50552.go
+++ b/test/typeparam/issue50552.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50561.dir/main.go b/test/typeparam/issue50561.dir/main.go
index bad7b6a..3e656bd 100644
--- a/test/typeparam/issue50561.dir/main.go
+++ b/test/typeparam/issue50561.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"diameter"
+	"./diameter"
 )
 
 func main() {
diff --git a/test/typeparam/issue50561.go b/test/typeparam/issue50561.go
index 060a121..8bb5c3e 100644
--- a/test/typeparam/issue50561.go
+++ b/test/typeparam/issue50561.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50598.dir/a1.go b/test/typeparam/issue50598.dir/a1.go
index 0e63fac..36624b4 100644
--- a/test/typeparam/issue50598.dir/a1.go
+++ b/test/typeparam/issue50598.dir/a1.go
@@ -4,7 +4,7 @@
 
 package a1
 
-import "a0"
+import "./a0"
 
 func New() int {
 	return a0.IntBuilder{}.New()
diff --git a/test/typeparam/issue50598.dir/a2.go b/test/typeparam/issue50598.dir/a2.go
index 3eb5200..c28be66 100644
--- a/test/typeparam/issue50598.dir/a2.go
+++ b/test/typeparam/issue50598.dir/a2.go
@@ -4,7 +4,7 @@
 
 package a2
 
-import "a0"
+import "./a0"
 
 func New() int {
 	return a0.Builder[int]{}.New1()
diff --git a/test/typeparam/issue50598.dir/main.go b/test/typeparam/issue50598.dir/main.go
index 0fab8b6..b0b6844 100644
--- a/test/typeparam/issue50598.dir/main.go
+++ b/test/typeparam/issue50598.dir/main.go
@@ -7,8 +7,8 @@
 import (
 	"fmt"
 
-	"a1"
-	"a2"
+	"./a1"
+	"./a2"
 )
 
 func New() int {
diff --git a/test/typeparam/issue50598.go b/test/typeparam/issue50598.go
index 642f4bf..aefbe67 100644
--- a/test/typeparam/issue50598.go
+++ b/test/typeparam/issue50598.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50642.go b/test/typeparam/issue50642.go
index 0cdbc36..d2d4a66 100644
--- a/test/typeparam/issue50642.go
+++ b/test/typeparam/issue50642.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50690a.go b/test/typeparam/issue50690a.go
index 0f5f5e9..6691af0 100644
--- a/test/typeparam/issue50690a.go
+++ b/test/typeparam/issue50690a.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50690b.go b/test/typeparam/issue50690b.go
index 572d8eb..09c84e0 100644
--- a/test/typeparam/issue50690b.go
+++ b/test/typeparam/issue50690b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50690c.go b/test/typeparam/issue50690c.go
index 8b87c2f..2db1487 100644
--- a/test/typeparam/issue50690c.go
+++ b/test/typeparam/issue50690c.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50833.go b/test/typeparam/issue50833.go
index 07c1a86..fe729b1 100644
--- a/test/typeparam/issue50833.go
+++ b/test/typeparam/issue50833.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50841.dir/b.go b/test/typeparam/issue50841.dir/b.go
index f2f7022..38e3de3 100644
--- a/test/typeparam/issue50841.dir/b.go
+++ b/test/typeparam/issue50841.dir/b.go
@@ -4,7 +4,7 @@
 
 package b
 
-import "a"
+import "./a"
 
 func F() {
 	a.Marshal[int]()
diff --git a/test/typeparam/issue50841.go b/test/typeparam/issue50841.go
index 060a121..8bb5c3e 100644
--- a/test/typeparam/issue50841.go
+++ b/test/typeparam/issue50841.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue50993.go b/test/typeparam/issue50993.go
index 39bdba0..4d459fd 100644
--- a/test/typeparam/issue50993.go
+++ b/test/typeparam/issue50993.go
@@ -1,4 +1,4 @@
-// compile -G=3 -d=checkptr
+// compile -d=checkptr
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51219.dir/main.go b/test/typeparam/issue51219.dir/main.go
index 999b4a9..14c6d17 100644
--- a/test/typeparam/issue51219.dir/main.go
+++ b/test/typeparam/issue51219.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/issue51219.go b/test/typeparam/issue51219.go
index 642f4bf..aefbe67 100644
--- a/test/typeparam/issue51219.go
+++ b/test/typeparam/issue51219.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51219b.go b/test/typeparam/issue51219b.go
index 060a121..8bb5c3e 100644
--- a/test/typeparam/issue51219b.go
+++ b/test/typeparam/issue51219b.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51232.go b/test/typeparam/issue51232.go
index 4e9d68c..0d25e18 100644
--- a/test/typeparam/issue51232.go
+++ b/test/typeparam/issue51232.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3
+// errorcheck
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51233.go b/test/typeparam/issue51233.go
index e6aabf3..96a25dd 100644
--- a/test/typeparam/issue51233.go
+++ b/test/typeparam/issue51233.go
@@ -1,4 +1,4 @@
-// errorcheck -G=3
+// errorcheck
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51236.go b/test/typeparam/issue51236.go
index 779c74e..51fde1e 100644
--- a/test/typeparam/issue51236.go
+++ b/test/typeparam/issue51236.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51245.go b/test/typeparam/issue51245.go
index bd4f7c5..425d517 100644
--- a/test/typeparam/issue51245.go
+++ b/test/typeparam/issue51245.go
@@ -1,4 +1,4 @@
-// build -gcflags=-G=3
+// build
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51303.go b/test/typeparam/issue51303.go
index 5f4bdc0..a3a7849 100644
--- a/test/typeparam/issue51303.go
+++ b/test/typeparam/issue51303.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51355.go b/test/typeparam/issue51355.go
index 15ffa4b..321d5ff 100644
--- a/test/typeparam/issue51355.go
+++ b/test/typeparam/issue51355.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51367.dir/main.go b/test/typeparam/issue51367.dir/main.go
index 64273d3..1de8793 100644
--- a/test/typeparam/issue51367.dir/main.go
+++ b/test/typeparam/issue51367.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 )
 
 func main() {
diff --git a/test/typeparam/issue51367.go b/test/typeparam/issue51367.go
index 642f4bf..aefbe67 100644
--- a/test/typeparam/issue51367.go
+++ b/test/typeparam/issue51367.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51423.go b/test/typeparam/issue51423.go
index 060a121..8bb5c3e 100644
--- a/test/typeparam/issue51423.go
+++ b/test/typeparam/issue51423.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51521.go b/test/typeparam/issue51521.go
new file mode 100644
index 0000000..5eb4e35
--- /dev/null
+++ b/test/typeparam/issue51521.go
@@ -0,0 +1,30 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"fmt"
+	"strings"
+)
+
+type I interface{ M() }
+
+func F[P I](p P) { defer catch(); p.M() }
+func G[T any]()  { defer catch(); interface{ M() T }.M(nil) }
+
+func main() {
+	F[I](nil)
+	G[int]()
+}
+
+func catch() {
+	err := recover()
+	if err, ok := err.(error); ok && strings.Contains(err.Error(), "nil pointer dereference") {
+		return
+	}
+	fmt.Println("FAIL", err)
+}
diff --git a/test/typeparam/issue51522a.go b/test/typeparam/issue51522a.go
index 31ce4bf..3f85408 100644
--- a/test/typeparam/issue51522a.go
+++ b/test/typeparam/issue51522a.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51522b.go b/test/typeparam/issue51522b.go
index 47de578..115b6b9 100644
--- a/test/typeparam/issue51522b.go
+++ b/test/typeparam/issue51522b.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2022 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/issue51700.go b/test/typeparam/issue51700.go
new file mode 100644
index 0000000..bf8a1f6
--- /dev/null
+++ b/test/typeparam/issue51700.go
@@ -0,0 +1,26 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func f[B any](b B) {
+	if b1, ok := any(b).(interface{ m1() }); ok {
+		panic(1)
+		_ = b1.(B)
+	}
+	if b2, ok := any(b).(interface{ m2() }); ok {
+		panic(2)
+		_ = b2.(B)
+	}
+}
+
+type S struct{}
+
+func (S) m3() {}
+
+func main() {
+	f(S{})
+}
diff --git a/test/typeparam/issue51733.go b/test/typeparam/issue51733.go
new file mode 100644
index 0000000..03624f1
--- /dev/null
+++ b/test/typeparam/issue51733.go
@@ -0,0 +1,32 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+	"log"
+	"unsafe"
+)
+
+//go:notinheap
+type S struct{}
+
+func main() {
+	p := (*S)(unsafe.Pointer(uintptr(0x8000)))
+	var v any = p
+	p2 := v.(*S)
+	if p != p2 {
+		log.Fatalf("%p != %p", unsafe.Pointer(p), unsafe.Pointer(p2))
+	}
+	p2 = typeAssert[*S](v)
+	if p != p2 {
+		log.Fatalf("%p != %p from typeAssert", unsafe.Pointer(p), unsafe.Pointer(p2))
+	}
+}
+
+func typeAssert[T any](v any) T {
+	return v.(T)
+}
diff --git a/test/typeparam/issue51765.go b/test/typeparam/issue51765.go
new file mode 100644
index 0000000..683cb0f
--- /dev/null
+++ b/test/typeparam/issue51765.go
@@ -0,0 +1,15 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type empty[T any] struct{}
+
+func (this *empty[T]) Next() (empty T, _ error) {
+	return empty, nil
+}
+
+var _ = &empty[string]{}
diff --git a/test/typeparam/issue51832.go b/test/typeparam/issue51832.go
new file mode 100644
index 0000000..c325ae6
--- /dev/null
+++ b/test/typeparam/issue51832.go
@@ -0,0 +1,25 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type F func() F
+
+func do[T any]() F {
+	return nil
+}
+
+type G[T any] func() G[T]
+
+//go:noinline
+func dog[T any]() G[T] {
+	return nil
+}
+
+func main() {
+	do[int]()
+	dog[int]()
+}
diff --git a/test/typeparam/issue51836.dir/a.go b/test/typeparam/issue51836.dir/a.go
new file mode 100644
index 0000000..e9223c9
--- /dev/null
+++ b/test/typeparam/issue51836.dir/a.go
@@ -0,0 +1,8 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type T[K any] struct {
+}
diff --git a/test/typeparam/issue51836.dir/aa.go b/test/typeparam/issue51836.dir/aa.go
new file mode 100644
index 0000000..d774be2
--- /dev/null
+++ b/test/typeparam/issue51836.dir/aa.go
@@ -0,0 +1,13 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+import (
+	"./a"
+)
+
+type T[K any] struct {
+	t a.T[K]
+}
diff --git a/test/typeparam/issue51836.dir/p.go b/test/typeparam/issue51836.dir/p.go
new file mode 100644
index 0000000..98197ae
--- /dev/null
+++ b/test/typeparam/issue51836.dir/p.go
@@ -0,0 +1,11 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+import (
+	a "./aa"
+)
+
+var Foo a.T[int]
diff --git a/test/typeparam/issue51836.go b/test/typeparam/issue51836.go
new file mode 100644
index 0000000..c755e74
--- /dev/null
+++ b/test/typeparam/issue51836.go
@@ -0,0 +1,7 @@
+// compiledir -s
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/typeparam/issue51840.go b/test/typeparam/issue51840.go
new file mode 100644
index 0000000..19fa3e4
--- /dev/null
+++ b/test/typeparam/issue51840.go
@@ -0,0 +1,36 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type Addr struct {
+	hi uint64
+	lo uint64
+	z  *byte
+}
+
+func EqualMap[M1, M2 ~map[K]V, K, V comparable](m1 M1, m2 M2) bool {
+	for k, v1 := range m1 {
+		if v2, ok := m2[k]; !ok || v1 != v2 {
+			return false
+		}
+	}
+	return true
+}
+
+type Set[T comparable] map[T]struct{}
+
+func NewSet[T comparable](items ...T) Set[T] {
+	return nil
+}
+
+func (s Set[T]) Equals(other Set[T]) bool {
+	return EqualMap(s, other)
+}
+
+func main() {
+	NewSet[Addr](Addr{0, 0, nil})
+}
diff --git a/test/typeparam/issue51909.go b/test/typeparam/issue51909.go
new file mode 100644
index 0000000..5fe39ca
--- /dev/null
+++ b/test/typeparam/issue51909.go
@@ -0,0 +1,30 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type None struct{}
+
+type Response interface {
+	send(ctx *struct{})
+}
+
+type HandlerFunc[Input any] func(Input) Response
+
+func Operation[Input any](method, path string, h HandlerFunc[Input]) {
+	var input Input
+	h(input)
+}
+
+func Get[Body any](path string, h HandlerFunc[struct{ Body Body }]) {
+	Operation("GET", path, h)
+}
+
+func main() {
+	Get("/", func(req struct{ Body None }) Response {
+		return nil
+	})
+}
diff --git a/test/typeparam/issue51925.go b/test/typeparam/issue51925.go
new file mode 100644
index 0000000..0a385ac
--- /dev/null
+++ b/test/typeparam/issue51925.go
@@ -0,0 +1,52 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "fmt"
+
+type IntLike interface {
+	~int | ~int64 | ~int32 | ~int16 | ~int8
+}
+
+func Reduce[T any, U any, Uslice ~[]U](function func(T, U) T, sequence Uslice, initial T) T {
+	result := initial
+	for _, x := range sequence {
+		result = function(result, x)
+	}
+	return result
+}
+
+func min[T IntLike](x, y T) T {
+	if x < y {
+		return x
+	}
+	return y
+
+}
+
+// Min returns the minimum element of `nums`.
+func Min[T IntLike, NumSlice ~[]T](nums NumSlice) T {
+	if len(nums) == 0 {
+		return T(0)
+	}
+	return Reduce(min[T], nums, nums[0])
+}
+
+// VarMin is the variadic version of Min.
+func VarMin[T IntLike](nums ...T) T {
+	return Min(nums)
+}
+
+type myInt int
+
+func main() {
+	fmt.Println(VarMin(myInt(1), myInt(2)))
+
+	seq := []myInt{1, 2}
+	fmt.Println(Min(seq))
+	fmt.Println(VarMin(seq...))
+}
diff --git a/test/typeparam/issue52026.go b/test/typeparam/issue52026.go
new file mode 100644
index 0000000..db8999a
--- /dev/null
+++ b/test/typeparam/issue52026.go
@@ -0,0 +1,50 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func returnOption[T any](n int) Option[T] {
+	if n == 1 {
+		return Some[T]{}
+	} else {
+		return None{}
+	}
+}
+
+type Option[T any] interface {
+	sealedOption()
+}
+
+type Some[T any] struct {
+	val T
+}
+
+func (s Some[T]) Value() T {
+	return s.val
+}
+
+func (s Some[T]) sealedOption() {}
+
+type None struct{}
+
+func (s None) sealedOption() {}
+
+func main() {
+	s := returnOption[int](1)
+	_ = s.(Some[int])
+
+	s = returnOption[int](0)
+	_ = s.(None)
+
+	switch (any)(s).(type) {
+	case Some[int]:
+		panic("s is a Some[int]")
+	case None:
+		// ok
+	default:
+		panic("oops")
+	}
+}
diff --git a/test/typeparam/issue52117.dir/a.go b/test/typeparam/issue52117.dir/a.go
new file mode 100644
index 0000000..e571ea9
--- /dev/null
+++ b/test/typeparam/issue52117.dir/a.go
@@ -0,0 +1,15 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+func Compare[T int | uint](a, b T) int {
+	return 0
+}
+
+type Slice[T int | uint] struct{}
+
+func (l Slice[T]) Comparator() func(v1, v2 T) int {
+	return Compare[T]
+}
diff --git a/test/typeparam/issue52117.dir/b.go b/test/typeparam/issue52117.dir/b.go
new file mode 100644
index 0000000..3d3bf4c
--- /dev/null
+++ b/test/typeparam/issue52117.dir/b.go
@@ -0,0 +1,7 @@
+package b
+
+import "./a"
+
+func Test() {
+	var _ a.Slice[uint]
+}
diff --git a/test/typeparam/issue52117.go b/test/typeparam/issue52117.go
new file mode 100644
index 0000000..8bb5c3e
--- /dev/null
+++ b/test/typeparam/issue52117.go
@@ -0,0 +1,7 @@
+// compiledir
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/test/typeparam/issue52124.go b/test/typeparam/issue52124.go
new file mode 100644
index 0000000..a113fc7
--- /dev/null
+++ b/test/typeparam/issue52124.go
@@ -0,0 +1,15 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type I interface{ any | int }
+
+var (
+	X I = 42
+	Y I = "xxx"
+	Z I = true
+)
diff --git a/test/typeparam/issue52228.go b/test/typeparam/issue52228.go
new file mode 100644
index 0000000..3fbbde5
--- /dev/null
+++ b/test/typeparam/issue52228.go
@@ -0,0 +1,30 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type SomeInterface interface {
+	Whatever()
+}
+
+func X[T any]() T {
+	var m T
+
+	// for this example, this block should never run
+	if _, ok := any(m).(SomeInterface); ok {
+		var dst SomeInterface
+		_, _ = dst.(T)
+		return dst.(T)
+	}
+
+	return m
+}
+
+type holder struct{}
+
+func main() {
+	X[holder]()
+}
diff --git a/test/typeparam/issue52241.go b/test/typeparam/issue52241.go
new file mode 100644
index 0000000..4feb97e
--- /dev/null
+++ b/test/typeparam/issue52241.go
@@ -0,0 +1,22 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type Collector[T any] struct {
+}
+
+func (c *Collector[T]) Collect() {
+}
+
+func TestInOrderIntTree() {
+	collector := Collector[int]{}
+	_ = collector.Collect
+}
+
+func main() {
+	TestInOrderIntTree()
+}
diff --git a/test/typeparam/issue53254.go b/test/typeparam/issue53254.go
new file mode 100644
index 0000000..afc0f18
--- /dev/null
+++ b/test/typeparam/issue53254.go
@@ -0,0 +1,19 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type Interface[T any] interface {
+}
+
+func F[T any]() Interface[T] {
+	var i int
+	return i
+}
+
+func main() {
+	F[int]()
+}
diff --git a/test/typeparam/issue53390.go b/test/typeparam/issue53390.go
new file mode 100644
index 0000000..52098c5
--- /dev/null
+++ b/test/typeparam/issue53390.go
@@ -0,0 +1,20 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+import "unsafe"
+
+func F[T any](v T) uintptr {
+	return unsafe.Alignof(func() T {
+		func(any) {}(struct{ _ T }{})
+		return v
+	}())
+}
+
+func f() {
+	F(0)
+}
diff --git a/test/typeparam/issue53406.go b/test/typeparam/issue53406.go
new file mode 100644
index 0000000..90fe78f
--- /dev/null
+++ b/test/typeparam/issue53406.go
@@ -0,0 +1,22 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+	f[int]()
+}
+
+func f[T1 any]() {
+	var x Outer[T1, int]
+	x.M()
+}
+
+type Outer[T1, T2 any] struct{ Inner[T2] }
+
+type Inner[_ any] int
+
+func (Inner[_]) M() {}
diff --git a/test/typeparam/issue53419.go b/test/typeparam/issue53419.go
new file mode 100644
index 0000000..62a226f
--- /dev/null
+++ b/test/typeparam/issue53419.go
@@ -0,0 +1,28 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type T1 struct{}
+type T2 struct{}
+type Both struct {
+	T1
+	T2
+}
+
+func (T1) m()   { panic("FAIL") }
+func (T2) m()   { panic("FAIL") }
+func (Both) m() {}
+
+func f[T interface{ m() }](c T) {
+	c.m()
+}
+
+func main() {
+	var b Both
+	b.m()
+	f(b)
+}
diff --git a/test/typeparam/issue53477.go b/test/typeparam/issue53477.go
new file mode 100644
index 0000000..d128a7e
--- /dev/null
+++ b/test/typeparam/issue53477.go
@@ -0,0 +1,34 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that generic interface-interface comparisons resulting from
+// value switch statements are handled correctly.
+
+package main
+
+func main() {
+	f[X](0)
+}
+
+type Mer[T any] interface{ M(T) }
+type MNer[T any] interface {
+	Mer[T]
+	N()
+}
+
+type X int
+
+func (X) M(X) {}
+func (X) N()  {}
+
+func f[T MNer[T]](t T) {
+	switch Mer[T](t) {
+	case MNer[T](t):
+		// ok
+	default:
+		panic("FAIL")
+	}
+}
diff --git a/test/typeparam/issue53762.go b/test/typeparam/issue53762.go
new file mode 100644
index 0000000..4d95988
--- /dev/null
+++ b/test/typeparam/issue53762.go
@@ -0,0 +1,18 @@
+// compile
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type Value[T any] interface {
+}
+
+func use[T any](v Value[T]) {
+	_, _ = v.(int)
+}
+
+func main() {
+	use(Value[int](1))
+}
diff --git a/test/typeparam/issue54135.go b/test/typeparam/issue54135.go
new file mode 100644
index 0000000..b489a51
--- /dev/null
+++ b/test/typeparam/issue54135.go
@@ -0,0 +1,32 @@
+// run
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type Foo struct{}
+
+func (Foo) Blanker() {}
+
+type Bar[T any] interface {
+	Blanker()
+}
+
+type Baz interface {
+	Some()
+}
+
+func check[T comparable](p Bar[T]) {
+	if x, ok := p.(any); !ok || x != p {
+		panic("FAIL")
+	}
+	if _, ok := p.(Baz); ok {
+		panic("FAIL")
+	}
+}
+
+func main() {
+	check[int](Foo{})
+}
diff --git a/test/typeparam/list.go b/test/typeparam/list.go
index adfe72f..311207e 100644
--- a/test/typeparam/list.go
+++ b/test/typeparam/list.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/list2.go b/test/typeparam/list2.go
index e7f346c..111ac78 100644
--- a/test/typeparam/list2.go
+++ b/test/typeparam/list2.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/listimp.dir/main.go b/test/typeparam/listimp.dir/main.go
index 985ff59..652a34a 100644
--- a/test/typeparam/listimp.dir/main.go
+++ b/test/typeparam/listimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/listimp.go b/test/typeparam/listimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/listimp.go
+++ b/test/typeparam/listimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/listimp2.dir/main.go b/test/typeparam/listimp2.dir/main.go
index 226e1a9..c3b936e 100644
--- a/test/typeparam/listimp2.dir/main.go
+++ b/test/typeparam/listimp2.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 	"strconv"
 )
diff --git a/test/typeparam/listimp2.go b/test/typeparam/listimp2.go
index 76930e5..40df49f 100644
--- a/test/typeparam/listimp2.go
+++ b/test/typeparam/listimp2.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/lockable.go b/test/typeparam/lockable.go
index 9b20d87..2b50e2c 100644
--- a/test/typeparam/lockable.go
+++ b/test/typeparam/lockable.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/map.go b/test/typeparam/map.go
index 72d05f0..eb68fe5 100644
--- a/test/typeparam/map.go
+++ b/test/typeparam/map.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mapimp.dir/main.go b/test/typeparam/mapimp.dir/main.go
index 4d4a4d9..8a56ce2 100644
--- a/test/typeparam/mapimp.dir/main.go
+++ b/test/typeparam/mapimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 	"reflect"
 	"strconv"
diff --git a/test/typeparam/mapimp.go b/test/typeparam/mapimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/mapimp.go
+++ b/test/typeparam/mapimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/maps.go b/test/typeparam/maps.go
index d18dd59..d4be5dd 100644
--- a/test/typeparam/maps.go
+++ b/test/typeparam/maps.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mapsimp.dir/main.go b/test/typeparam/mapsimp.dir/main.go
index 873660e..45f7d39 100644
--- a/test/typeparam/mapsimp.dir/main.go
+++ b/test/typeparam/mapsimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 	"math"
 	"sort"
diff --git a/test/typeparam/mapsimp.go b/test/typeparam/mapsimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/mapsimp.go
+++ b/test/typeparam/mapsimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/1.go b/test/typeparam/mdempsky/1.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/mdempsky/1.go
+++ b/test/typeparam/mdempsky/1.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/10.go b/test/typeparam/mdempsky/10.go
index 76930e5..40df49f 100644
--- a/test/typeparam/mdempsky/10.go
+++ b/test/typeparam/mdempsky/10.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/12.go b/test/typeparam/mdempsky/12.go
index a2dc4da..0316402 100644
--- a/test/typeparam/mdempsky/12.go
+++ b/test/typeparam/mdempsky/12.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/13.go b/test/typeparam/mdempsky/13.go
index b492774..8e11352 100644
--- a/test/typeparam/mdempsky/13.go
+++ b/test/typeparam/mdempsky/13.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/14.go b/test/typeparam/mdempsky/14.go
index ba685bc..4af990c 100644
--- a/test/typeparam/mdempsky/14.go
+++ b/test/typeparam/mdempsky/14.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/15.go b/test/typeparam/mdempsky/15.go
index 4899fc7..b03ad6f 100644
--- a/test/typeparam/mdempsky/15.go
+++ b/test/typeparam/mdempsky/15.go
@@ -1,4 +1,4 @@
-// run -goexperiment fieldtrack -gcflags=-G=3
+// run -goexperiment fieldtrack
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/2.go b/test/typeparam/mdempsky/2.go
index f09730f..ad548e6 100644
--- a/test/typeparam/mdempsky/2.go
+++ b/test/typeparam/mdempsky/2.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/3.go b/test/typeparam/mdempsky/3.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/mdempsky/3.go
+++ b/test/typeparam/mdempsky/3.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/4.go b/test/typeparam/mdempsky/4.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/mdempsky/4.go
+++ b/test/typeparam/mdempsky/4.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/5.go b/test/typeparam/mdempsky/5.go
index 0d1ad39..00d3b71 100644
--- a/test/typeparam/mdempsky/5.go
+++ b/test/typeparam/mdempsky/5.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/6.go b/test/typeparam/mdempsky/6.go
index a26ff62..ed57009 100644
--- a/test/typeparam/mdempsky/6.go
+++ b/test/typeparam/mdempsky/6.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/7.go b/test/typeparam/mdempsky/7.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/mdempsky/7.go
+++ b/test/typeparam/mdempsky/7.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/8.go b/test/typeparam/mdempsky/8.go
index 32cf4b8..e3a470b 100644
--- a/test/typeparam/mdempsky/8.go
+++ b/test/typeparam/mdempsky/8.go
@@ -1,4 +1,4 @@
-// errorcheckdir -G=3
+// errorcheckdir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mdempsky/9.go b/test/typeparam/mdempsky/9.go
index b72516c..948a9e5 100644
--- a/test/typeparam/mdempsky/9.go
+++ b/test/typeparam/mdempsky/9.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/metrics.go b/test/typeparam/metrics.go
index 8a39d99..dcc5737 100644
--- a/test/typeparam/metrics.go
+++ b/test/typeparam/metrics.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/min.go b/test/typeparam/min.go
index d6c65d6..a922450 100644
--- a/test/typeparam/min.go
+++ b/test/typeparam/min.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mincheck.dir/main.go b/test/typeparam/mincheck.dir/main.go
index 63786de..c9ca50a 100644
--- a/test/typeparam/mincheck.dir/main.go
+++ b/test/typeparam/mincheck.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/mincheck.go b/test/typeparam/mincheck.go
index 32cf4b8..e3a470b 100644
--- a/test/typeparam/mincheck.go
+++ b/test/typeparam/mincheck.go
@@ -1,4 +1,4 @@
-// errorcheckdir -G=3
+// errorcheckdir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/minimp.dir/main.go b/test/typeparam/minimp.dir/main.go
index 509f5aa..36bec0f 100644
--- a/test/typeparam/minimp.dir/main.go
+++ b/test/typeparam/minimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/minimp.go b/test/typeparam/minimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/minimp.go
+++ b/test/typeparam/minimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/mutualimp.go b/test/typeparam/mutualimp.go
index 87b4ff4..b83fbd7 100644
--- a/test/typeparam/mutualimp.go
+++ b/test/typeparam/mutualimp.go
@@ -1,4 +1,4 @@
-// compiledir -G=3
+// compiledir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/nested.go b/test/typeparam/nested.go
index c0037a3..cdb8bfb 100644
--- a/test/typeparam/nested.go
+++ b/test/typeparam/nested.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/ordered.go b/test/typeparam/ordered.go
index 0f539d6..d304298 100644
--- a/test/typeparam/ordered.go
+++ b/test/typeparam/ordered.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/orderedmap.go b/test/typeparam/orderedmap.go
index 1f07733..1245669 100644
--- a/test/typeparam/orderedmap.go
+++ b/test/typeparam/orderedmap.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/orderedmapsimp.dir/main.go b/test/typeparam/orderedmapsimp.dir/main.go
index 978f1e7..7758a75 100644
--- a/test/typeparam/orderedmapsimp.dir/main.go
+++ b/test/typeparam/orderedmapsimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"bytes"
 	"fmt"
 )
diff --git a/test/typeparam/orderedmapsimp.go b/test/typeparam/orderedmapsimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/orderedmapsimp.go
+++ b/test/typeparam/orderedmapsimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/pair.go b/test/typeparam/pair.go
index c1427b9..dd0adb1 100644
--- a/test/typeparam/pair.go
+++ b/test/typeparam/pair.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/pairimp.dir/main.go b/test/typeparam/pairimp.dir/main.go
index 027fdd9..f76da43 100644
--- a/test/typeparam/pairimp.dir/main.go
+++ b/test/typeparam/pairimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 	"unsafe"
 )
diff --git a/test/typeparam/pairimp.go b/test/typeparam/pairimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/pairimp.go
+++ b/test/typeparam/pairimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/pragma.go b/test/typeparam/pragma.go
index 6743e24..59411ab 100644
--- a/test/typeparam/pragma.go
+++ b/test/typeparam/pragma.go
@@ -1,4 +1,4 @@
-// errorcheck -0 -m -G=3
+// errorcheck -0 -m
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/recoverimp.dir/main.go b/test/typeparam/recoverimp.dir/main.go
index c9d8e3c..d8cfa38 100644
--- a/test/typeparam/recoverimp.dir/main.go
+++ b/test/typeparam/recoverimp.dir/main.go
@@ -4,7 +4,7 @@
 
 package main
 
-import "a"
+import "./a"
 
 func main() {
 	a.F(5.3)
diff --git a/test/typeparam/recoverimp.go b/test/typeparam/recoverimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/recoverimp.go
+++ b/test/typeparam/recoverimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/select.go b/test/typeparam/select.go
index 76930e5..40df49f 100644
--- a/test/typeparam/select.go
+++ b/test/typeparam/select.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/sets.go b/test/typeparam/sets.go
index 4f07b59..bd08ad7 100644
--- a/test/typeparam/sets.go
+++ b/test/typeparam/sets.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/setsimp.dir/main.go b/test/typeparam/setsimp.dir/main.go
index 8fd1657..e1ec86a 100644
--- a/test/typeparam/setsimp.dir/main.go
+++ b/test/typeparam/setsimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 	"sort"
 )
diff --git a/test/typeparam/setsimp.go b/test/typeparam/setsimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/setsimp.go
+++ b/test/typeparam/setsimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/settable.go b/test/typeparam/settable.go
index 6179ae0..56cf367 100644
--- a/test/typeparam/settable.go
+++ b/test/typeparam/settable.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/shape1.go b/test/typeparam/shape1.go
index de1ea65..2400f1c 100644
--- a/test/typeparam/shape1.go
+++ b/test/typeparam/shape1.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/sliceimp.dir/main.go b/test/typeparam/sliceimp.dir/main.go
index 0f79e10..ec13188 100644
--- a/test/typeparam/sliceimp.dir/main.go
+++ b/test/typeparam/sliceimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 	"math"
 	"strings"
diff --git a/test/typeparam/sliceimp.go b/test/typeparam/sliceimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/sliceimp.go
+++ b/test/typeparam/sliceimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/slices.go b/test/typeparam/slices.go
index 4bdf107..b24817d 100644
--- a/test/typeparam/slices.go
+++ b/test/typeparam/slices.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/smallest.go b/test/typeparam/smallest.go
index af1d72d..0ebd10e 100644
--- a/test/typeparam/smallest.go
+++ b/test/typeparam/smallest.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/smoketest.go b/test/typeparam/smoketest.go
index f32b400..b720e04 100644
--- a/test/typeparam/smoketest.go
+++ b/test/typeparam/smoketest.go
@@ -1,4 +1,4 @@
-// compile -G=1
+// compile
 
 // Copyright 2020 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/stringable.go b/test/typeparam/stringable.go
index 855a1ed..791b670 100644
--- a/test/typeparam/stringable.go
+++ b/test/typeparam/stringable.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/stringer.go b/test/typeparam/stringer.go
index 81290d5..0892cd8 100644
--- a/test/typeparam/stringer.go
+++ b/test/typeparam/stringer.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/stringerimp.dir/main.go b/test/typeparam/stringerimp.dir/main.go
index e30bdf1..9b41d3b 100644
--- a/test/typeparam/stringerimp.dir/main.go
+++ b/test/typeparam/stringerimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 	"reflect"
 	"strconv"
diff --git a/test/typeparam/stringerimp.go b/test/typeparam/stringerimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/stringerimp.go
+++ b/test/typeparam/stringerimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/struct.go b/test/typeparam/struct.go
index ad1b41d..2dad908 100644
--- a/test/typeparam/struct.go
+++ b/test/typeparam/struct.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/structinit.go b/test/typeparam/structinit.go
index 76930e5..40df49f 100644
--- a/test/typeparam/structinit.go
+++ b/test/typeparam/structinit.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/subdict.go b/test/typeparam/subdict.go
index c519b4f..463c510 100644
--- a/test/typeparam/subdict.go
+++ b/test/typeparam/subdict.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/sum.go b/test/typeparam/sum.go
index d444e00..25bac18 100644
--- a/test/typeparam/sum.go
+++ b/test/typeparam/sum.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/tparam1.go b/test/typeparam/tparam1.go
index ef024ce..a05f542 100644
--- a/test/typeparam/tparam1.go
+++ b/test/typeparam/tparam1.go
@@ -1,4 +1,4 @@
-// errorcheck -G
+// errorcheck
 
 // Copyright 2020 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/typelist.go b/test/typeparam/typelist.go
index c82cb5f..7c71321 100644
--- a/test/typeparam/typelist.go
+++ b/test/typeparam/typelist.go
@@ -1,4 +1,4 @@
-// compile -G=3
+// compile
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/typeswitch1.go b/test/typeparam/typeswitch1.go
index 834302e..a0468d3 100644
--- a/test/typeparam/typeswitch1.go
+++ b/test/typeparam/typeswitch1.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
@@ -28,4 +28,6 @@
 	f[float64](int8(9))
 	f[int32](int32(7))
 	f[int](int32(7))
+	f[any](int(10))
+	f[interface{ M() }](int(11))
 }
diff --git a/test/typeparam/typeswitch1.out b/test/typeparam/typeswitch1.out
index dc5dfdb..6b8a33c 100644
--- a/test/typeparam/typeswitch1.out
+++ b/test/typeparam/typeswitch1.out
@@ -5,3 +5,5 @@
 other
 T
 int32/int16
+T
+int
diff --git a/test/typeparam/typeswitch2.go b/test/typeparam/typeswitch2.go
index ce4af34..286002a 100644
--- a/test/typeparam/typeswitch2.go
+++ b/test/typeparam/typeswitch2.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
@@ -6,20 +6,20 @@
 
 package main
 
-import "reflect"
+import "fmt"
 
 func f[T any](i interface{}) {
 	switch x := i.(type) {
 	case T:
-		println("T", x)
+		fmt.Println("T", x)
 	case int:
-		println("int", x)
+		fmt.Println("int", x)
 	case int32, int16:
-		println("int32/int16", reflect.ValueOf(x).Int())
+		fmt.Println("int32/int16", x)
 	case struct{ a, b T }:
-		println("struct{T,T}", x.a, x.b)
+		fmt.Println("struct{T,T}", x.a, x.b)
 	default:
-		println("other", reflect.ValueOf(x).Int())
+		fmt.Println("other", x)
 	}
 }
 func main() {
@@ -30,4 +30,6 @@
 	f[float64](int8(9))
 	f[int32](int32(7))
 	f[int](int32(7))
+	f[any](int(10))
+	f[interface{ M() }](int(11))
 }
diff --git a/test/typeparam/typeswitch2.out b/test/typeparam/typeswitch2.out
index 85b54e3..6d4df54 100644
--- a/test/typeparam/typeswitch2.out
+++ b/test/typeparam/typeswitch2.out
@@ -1,7 +1,9 @@
-T +6.000000e+000
+T 6
 int 7
 int32/int16 8
-struct{T,T} +1.000000e+000 +2.000000e+000
+struct{T,T} 1 2
 other 9
 T 7
 int32/int16 7
+T 10
+int 11
diff --git a/test/typeparam/typeswitch3.go b/test/typeparam/typeswitch3.go
index 0527a83..b84fdd0 100644
--- a/test/typeparam/typeswitch3.go
+++ b/test/typeparam/typeswitch3.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
@@ -7,6 +7,10 @@
 package main
 
 type I interface{ foo() int }
+type J interface {
+	I
+	bar()
+}
 
 type myint int
 
@@ -19,6 +23,7 @@
 type myint32 int32
 
 func (x myint32) foo() int { return int(x) }
+func (x myint32) bar()     {}
 
 func f[T I](i I) {
 	switch x := i.(type) {
@@ -37,4 +42,7 @@
 	f[myint32](myint32(8))
 	f[myint32](myfloat(7))
 	f[myint](myint32(9))
+	f[I](myint(10))
+	f[J](myint(11))
+	f[J](myint32(12))
 }
diff --git a/test/typeparam/typeswitch3.out b/test/typeparam/typeswitch3.out
index ed59987..05ed533 100644
--- a/test/typeparam/typeswitch3.out
+++ b/test/typeparam/typeswitch3.out
@@ -4,3 +4,6 @@
 T 8
 other 7
 other 9
+T 10
+myint 11
+T 12
diff --git a/test/typeparam/typeswitch4.go b/test/typeparam/typeswitch4.go
index 08de2a1..3fdf552 100644
--- a/test/typeparam/typeswitch4.go
+++ b/test/typeparam/typeswitch4.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
@@ -7,6 +7,10 @@
 package main
 
 type I interface{ foo() int }
+type J interface {
+	I
+	bar()
+}
 
 type myint int
 
@@ -19,6 +23,7 @@
 type myint32 int32
 
 func (x myint32) foo() int { return int(x) }
+func (x myint32) bar()     {}
 
 func f[T I](i I) {
 	switch x := i.(type) {
@@ -35,4 +40,7 @@
 	f[myint32](myint32(9))
 	f[myint](myint32(10))
 	f[myint](myfloat(42))
+	f[I](myint(10))
+	f[J](myint(11))
+	f[J](myint32(12))
 }
diff --git a/test/typeparam/typeswitch4.out b/test/typeparam/typeswitch4.out
index d6121d0..b98f074 100644
--- a/test/typeparam/typeswitch4.out
+++ b/test/typeparam/typeswitch4.out
@@ -4,3 +4,6 @@
 T/myint32 9
 T/myint32 10
 other 42
+T/myint32 10
+other 11
+T/myint32 12
diff --git a/test/typeparam/typeswitch5.go b/test/typeparam/typeswitch5.go
index 1fc6e0a..ac52adb 100644
--- a/test/typeparam/typeswitch5.go
+++ b/test/typeparam/typeswitch5.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/typeswitch6.go b/test/typeparam/typeswitch6.go
index 574f4aa..81d4f20 100644
--- a/test/typeparam/typeswitch6.go
+++ b/test/typeparam/typeswitch6.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/typeswitch7.go b/test/typeparam/typeswitch7.go
index f2e1279..067bed7 100644
--- a/test/typeparam/typeswitch7.go
+++ b/test/typeparam/typeswitch7.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/valimp.dir/main.go b/test/typeparam/valimp.dir/main.go
index 606ff22..e357af4 100644
--- a/test/typeparam/valimp.dir/main.go
+++ b/test/typeparam/valimp.dir/main.go
@@ -5,7 +5,7 @@
 package main
 
 import (
-	"a"
+	"./a"
 	"fmt"
 )
 
diff --git a/test/typeparam/valimp.go b/test/typeparam/valimp.go
index 76930e5..40df49f 100644
--- a/test/typeparam/valimp.go
+++ b/test/typeparam/valimp.go
@@ -1,4 +1,4 @@
-// rundir -G=3
+// rundir
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/typeparam/value.go b/test/typeparam/value.go
index 6c6dabc..be25dce 100644
--- a/test/typeparam/value.go
+++ b/test/typeparam/value.go
@@ -1,4 +1,4 @@
-// run -gcflags=-G=3
+// run
 
 // Copyright 2021 The Go Authors. All rights reserved.
 // Use of this source code is governed by a BSD-style
diff --git a/test/uintptrkeepalive.go b/test/uintptrkeepalive.go
new file mode 100644
index 0000000..97834dc
--- /dev/null
+++ b/test/uintptrkeepalive.go
@@ -0,0 +1,11 @@
+// errorcheck -std
+
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+//go:uintptrkeepalive
+func missingNosplit(uintptr) { // ERROR "go:uintptrkeepalive requires go:nosplit"
+}