diff options
author | Dan Scales <danscales@google.com> | 2021-07-13 22:21:54 -0700 |
---|---|---|
committer | Dan Scales <danscales@google.com> | 2021-07-14 21:58:10 +0000 |
commit | e3e6cd30221185d6e4fa76f109f96fdede580729 (patch) | |
tree | 7457c8f438c9633f7a1f29f5c9e84f3d1201ea2a /test/run.go | |
parent | 2b10d7ff0be9ee5ebe1856349714f78936bf059d (diff) | |
download | go-e3e6cd30221185d6e4fa76f109f96fdede580729.tar.gz go-e3e6cd30221185d6e4fa76f109f96fdede580729.zip |
[dev.typeparams] cmd/compile: fix escape printout bugs for -G=3
Call SetPos() in g.expr() so it is available for any new nodes.
Print out the actual type for a composite literal in exprFmt() if
available, else use Ntype if available. Seems generally useful, since
the type name is always more useful than just 'composite literal'.
Fixes a bunch of cases that are excluded in run.go for -G=3.
Change-Id: I40b9bba88027ea4f36d419e3989e7f14891bea04
Reviewed-on: https://go-review.googlesource.com/c/go/+/334609
Trust: Dan Scales <danscales@google.com>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'test/run.go')
-rw-r--r-- | test/run.go | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/test/run.go b/test/run.go index d6209c2591..82d49270f2 100644 --- a/test/run.go +++ b/test/run.go @@ -2167,40 +2167,12 @@ var types2Failures32Bit = setOf( ) var g3Failures = setOf( - // TODO: Triage tests without explicit failure explanations. From a - // cursory inspection, they mostly fall into: - // - Anonymous result parameters given different names (e.g., ~r0 vs ~r1) - // - Some escape analysis diagnostics being printed without position information - // - Some expressions printed differently (e.g., "int(100)" instead - // of "100" or "&composite literal" instead of "&[4]int{...}"). - - "closure3.go", // prints "s escapes to heap" without line number - "escape2.go", - "escape2n.go", - "escape4.go", // prints "1 escapes to heap" without line number - "escape_calls.go", - "escape_field.go", - "escape_iface.go", - "escape_indir.go", - "escape_level.go", - "escape_map.go", - "escape_param.go", - "escape_slice.go", - "escape_struct_param1.go", - "escape_struct_param2.go", - "writebarrier.go", // correct diagnostics, but different lines (probably irgen's fault) - - "fixedbugs/issue12006.go", - "fixedbugs/issue13799.go", + "writebarrier.go", // correct diagnostics, but different lines (probably irgen's fault) "fixedbugs/issue17270.go", // ICE in irgen "fixedbugs/issue20174.go", // ICE due to width not calculated (probably irgen's fault) "fixedbugs/issue20250.go", // correct diagnostics, but different lines (probably irgen's fault) - "fixedbugs/issue21709.go", - "fixedbugs/issue31573.go", - "fixedbugs/issue37837.go", - "fixedbugs/issue39292.go", - "fixedbugs/issue7921.go", // prints "composite literal does not escape" but test expects "[]byte{...} does not escape" - "fixedbugs/issue9691.go", // "cannot assign to int(.autotmp_4)" (probably irgen's fault) + "fixedbugs/issue37837.go", // ICE due to width not calculated + "fixedbugs/issue9691.go", // "cannot assign to int(.autotmp_4)" (probably irgen's fault) "typeparam/nested.go", // -G=3 doesn't support function-local types with generics |