mirror of
https://github.com/golang/go
synced 2024-11-23 08:10:03 -07:00
5b9152de57
3820 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Matthew Dempsky
|
5b9152de57 |
[dev.typeparams] all: merge dev.regabi (cb05a0a ) into dev.typeparams
Merge List: + 2021-01-05 |
||
Matthew Dempsky
|
cb05a0aa6a |
[dev.regabi] cmd/compile: remove toolstash scaffolding
Now that CaptureVars is gone, we can remove the extra code in escape analysis that only served to appease toolstash -cmp. Change-Id: I8c811834f3d966e76702e2d362e3de414c94bea6 Reviewed-on: https://go-review.googlesource.com/c/go/+/281544 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Matthew Dempsky
|
fd43831f44 |
[dev.regabi] cmd/compile: reimplement capture analysis
Currently we rely on the type-checker to do some basic data-flow analysis to help decide whether function literals should capture variables by value or reference. However, this analysis isn't done by go/types, and escape analysis already has a better framework for doing this more precisely. This CL extends escape analysis to recalculate the same "byval" as CaptureVars and check that it matches. A future CL will remove CaptureVars in favor of escape analysis's calculation. Notably, escape analysis happens after deadcode removes obviously unreachable code, so it sees the AST without any unreachable assignments. (Also without unreachable addrtakens, but ComputeAddrtaken already happens after deadcode too.) There are two test cases where a variable is only reassigned on certain CPUs. This CL changes them to reassign the variables unconditionally (as no-op reassignments that avoid triggering cmd/vet's self-assignment check), at least until we remove CaptureVars. Passes toolstash -cmp. Change-Id: I7162619739fedaf861b478fb8d506f96a6ac21f3 Reviewed-on: https://go-review.googlesource.com/c/go/+/281535 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Matthew Dempsky
|
fb69c67cad |
[dev.regabi] test: enable finalizer tests on !amd64
The gc implementation has had precise GC for a while now, so we can enable these tests more broadly. Confirmed that they still fail with gccgo 10.2.1. Change-Id: Ic1c0394ab832024a99e34163c422941a3706e1a2 Reviewed-on: https://go-review.googlesource.com/c/go/+/281542 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Matthew Dempsky
|
a8fe098a12 |
[dev.typeparams] all: merge dev.regabi (77365c5 ) into dev.typeparams
Conflicts: - src/cmd/compile/internal/gc/main.go - test/fixedbugs/issue15055.go Merge List: + 2021-01-05 |
||
Matthew Dempsky
|
d89705e087 |
[dev.regabi] cmd/compile: fix re-export of parameters
When exporting signature types, we include the originating package, because it's exposed via go/types's API. And as a consistency check, we ensure that the parameter names came from that same package. However, we were getting this wrong in the case of exported variables that were initialized with a method value using an imported method. In this case, when we created the method value wrapper function's type (which is reused as the variable's type if none is explicitly provided in the variable declaration), we were reusing the original (i.e., imported) parameter names, but the newly created signature type was associated with the current package instead. The correct fix here is really to preserve the original signature type's package (along with position and name for its parameters), but that's awkward to do at the moment because the DeclFunc API requires an ir representation of the function signature, whereas we only provide a way to explicitly set packages via the type constructor APIs. As an interim fix, we associate the parameters with the current package, to be consistent with the signature type's package. Fixes #43479. Change-Id: Id45a10f8cf64165c9bc7d9598f0a0ee199a5e752 Reviewed-on: https://go-review.googlesource.com/c/go/+/281292 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Matthew Dempsky
|
290b4154b7 |
[dev.regabi] cmd/compile: fix ICE due to large uint64 constants
It's an error to call Int64Val on constants that don't fit into int64. CL 272654 made the compiler stricter about detecting misuse, and revealed that we were using it improperly in detecting consecutive integer-switch cases. That particular usage actually did work in practice, but it's easy and best to just fix it. Fixes #43480. Change-Id: I56f722d75e83091638ac43b80e45df0b0ad7d48d Reviewed-on: https://go-review.googlesource.com/c/go/+/281272 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Matthew Dempsky
|
907a4bfdc7 |
[dev.regabi] cmd/compile: fix map assignment order
After the previous cleanup/optimization CLs, ascompatee now correctly handles map assignments too. So remove the code from order.mapAssign, which causes us to assign to the map at the wrong point during execution. It's not every day you get to fix an issue by only removing code. Thanks to Cuong Manh Le for test cases and continually following up on this issue. Passes toolstash -cmp. (Apparently the standard library never uses tricky map assignments. Go figure.) Fixes #23017. Change-Id: Ie0728103d59d884d00c1c050251290a2a46150f9 Reviewed-on: https://go-review.googlesource.com/c/go/+/281172 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Matthew Dempsky
|
bfa97ba48f |
[dev.regabi] test: add another closure test case
When deciding whether a captured variable can be passed by value, the compiler is sensitive to the order that the OCLOSURE node is typechecked relative to the order that the variable is passed to "checkassign". Today, for an assignment like: q, g = 2, func() int { return q } we get this right because we always typecheck the full RHS expression list before calling checkassign on any LHS expression. But I nearly made a change that would interleave this ordering, causing us to call checkassign on q before typechecking the function literal. And alarmingly, there weren't any tests that caught this. So this commit adds one. Change-Id: I66cacd61066c7a229070861a7d973bcc434904cc Reviewed-on: https://go-review.googlesource.com/c/go/+/280998 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Matthew Dempsky
|
68e6fa4f68 |
[dev.regabi] cmd/compile: fix package-initialization order
This CL fixes package initialization order by creating the init task before the general deadcode-removal pass. It also changes noder to emit zero-initialization assignments (i.e., OAS with nil RHS) for package-block variables, so that initOrder can tell the variables still need initialization. To allow this, we need to also extend the static-init code to recognize zero-initialization assignments. This doesn't pass toolstash -cmp, because it reorders some package initialization routines. Fixes #43444. Change-Id: I0da7996a62c85e15e97ce965298127e075390a7e Reviewed-on: https://go-review.googlesource.com/c/go/+/280976 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Matthew Dempsky
|
477b049060 |
[dev.regabi] cmd/compile: fix printing of method expressions
OTYPE and OMETHEXPR were missing from OpPrec. So add them with the same precedences as OT{ARRAY,MAP,STRUCT,etc} and ODOT{,METH,INTER,etc}, respectively. However, ODEREF (which is also used for pointer types *T) has a lower precedence than other types, so pointer types need to be specially handled to assign them their correct, lower precedence. Incidentally, this also improves the error messages in issue15055.go, where we were adding unnecessary parentheses around the types in conversion expressions. Thanks to Cuong Manh Le for writing the test cases for #43428. Fixes #43428. Change-Id: I57e7979babe3ed9ef8a8b5a2a3745e3737dd785f Reviewed-on: https://go-review.googlesource.com/c/go/+/280873 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Matthew Dempsky
|
0c1a899a6c |
[dev.regabi] cmd/compile: fix defined-pointer method call check
The compiler has logic to check whether we implicitly dereferenced a defined pointer while trying to select a method. However, rather than checking whether there were any implicit dereferences of a defined pointer, it was finding the innermost dereference/selector expression and checking whether that was dereferencing a named pointer. Moreover, it was only checking defined pointer declared in the package block. This CL restructures the code to match go/types and gccgo's behavior. Fixes #43384. Change-Id: I7bddfe2515776d9480eb2c7286023d4c15423888 Reviewed-on: https://go-review.googlesource.com/c/go/+/280392 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> Trust: Robert Griesemer <gri@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> |
||
Matthew Dempsky
|
a800acaae1 |
[dev.typeparams] all: merge dev.regabi (07569da ) into dev.typeparams
Conflicts: - test/fixedbugs/issue27595.go - test/fixedbugs/issue30087.go - test/used.go Merge List: + 2020-12-28 |
||
Matthew Dempsky
|
e6c973198d |
[dev.regabi] cmd/compile: stop mangling SelectorExpr.Sel for ODOTMETH
ODOTMETH is unique among SelectorExpr expressions, in that Sel gets mangled so that it no longer has the original identifier that was selected (e.g., just "Foo"), but instead the qualified symbol name for the selected method (e.g., "pkg.Type.Foo"). This is rarely useful, and instead results in a lot of compiler code needing to worry about undoing this change. This CL changes ODOTMETH to leave the original symbol in place. The handful of code locations where the mangled symbol name is actually wanted are updated to use ir.MethodExprName(n).Sym() or (equivalently) ir.MethodExprName(n).Func.Sym() instead. Historically, the compiler backend has mistakenly used types.Syms where it should have used ir.Name/ir.Funcs. And this change in particular may risk breaking something, as the SelectorExpr.Sel will no longer point at a symbol that uniquely identifies the called method. However, I expect CL 280294 (desugar OCALLMETH into OCALLFUNC) to have substantially reduced this risk, as ODOTMETH expressions are now replaced entirely earlier in the compiler. Passes toolstash -cmp. Change-Id: If3c9c3b7df78ea969f135840574cf89e1d263876 Reviewed-on: https://go-review.googlesource.com/c/go/+/280436 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Matthew Dempsky
|
396b6c2e7c |
[dev.regabi] cmd/compile: cleanup assignment typechecking
The assignment type-checking code previously bounced around a lot between the LHS and RHS sides of the assignment. But there's actually a very simple, consistent pattern to how to type check assignments: 1. Check the RHS expression. 2. If the LHS expression is an identifier that was declared in this statement and it doesn't have an explicit type, give it the RHS expression's default type. 3. Check the LHS expression. 4. Try assigning the RHS expression to the LHS expression, adding implicit conversions as needed. This CL implements this algorithm, and refactors tcAssign and tcAssignList to use a common implementation. It also fixes the error messages to consistently say just "1 variable" or "1 value", rather than occasionally "1 variables" or "1 values". Fixes #43348. Passes toolstash -cmp. Change-Id: I749cb8d6ccbc7d22cd7cb0a381f58a39fc2696b5 Reviewed-on: https://go-review.googlesource.com/c/go/+/280112 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> |
||
Russ Cox
|
91cc51e005 |
[dev.typeparams] all: merge dev.regabi (ec741b0 ) into dev.typeparams
Conflicts: * src/cmd/compile/internal/gc/main.go Merge List: * 2020-12-22 |
||
Russ Cox
|
ec741b0447 |
[dev.regabi] all: merge master (c9fb4eb ) into dev.regabi
Merge List: * 2020-12-22 |
||
Cherry Zhang
|
c06a354bcc |
test: trigger SIGSEGV instead of SIGTRAP in issue11656.go
In issue11656.go, it tests that if the runtime can get a reasonable traceback when it faults at a non-function PC. It does it by jumping to an address that contains an illegal or trap instruction. When it traps, the SIGTRAP crashes the runtime. This CL changes it to use an instruction that triggers SIGSEGV. This is due to two reasons: - currently, the handling of bad PC is done by preparePanic, which is only used for a panicking signal (SIGSEGV, SIGBUS, SIGFPE), not a fatal signal (e.g. SIGTRAP). - the test uses defer+recover to get a traceback, which only works for panicking signals, not fatal signals. Ideally, we should handle all kinds of faults (SIGSEGV, SIGBUS, SIGILL, SIGTRAP, etc.) with a nice traceback. I'll leave this for the future. This CL also adds RISCV64 support. Fixes #43283. Change-Id: I5e0fbf8530cc89d16e05c3257d282bc1d4d03405 Reviewed-on: https://go-review.googlesource.com/c/go/+/279423 Trust: Cherry Zhang <cherryyz@google.com> Reviewed-by: Ian Lance Taylor <iant@golang.org> |
||
Than McIntosh
|
cb28c96be8 |
[dev.regabi] cmd/compile,cmd/link: initial support for ABI wrappers
Add compiler support for emitting ABI wrappers by creating real IR as opposed to introducing ABI aliases. At the moment these are "no-op" wrappers in the sense that they make a simple call (using the existing ABI) to their target. The assumption here is that once late call expansion can handle both ABI0 and the "new" ABIInternal (register version), it can expand the call to do the right thing. Note that the runtime contains functions that do not strictly follow the rules of the current Go ABI0; this has been handled in most cases by treating these as ABIInternal instead (these changes have been made in previous patches). Generation of ABI wrappers (as opposed to ABI aliases) is currently gated by GOEXPERIMENT=regabi -- wrapper generation is on by default if GOEXPERIMENT=regabi is set and off otherwise (but can be turned on using "-gcflags=all=-abiwrap -ldflags=-abiwrap"). Wrapper generation currently only workd on AMD64; explicitly enabling wrapper for other architectures (via the command line) is not supported. Also in this patch are a few other command line options for debugging (tracing and/or limiting wrapper creation). These will presumably go away at some point. Updates #27539, #40724. Change-Id: I1ee3226fc15a3c32ca2087b8ef8e41dbe6df4a75 Reviewed-on: https://go-review.googlesource.com/c/go/+/270863 Run-TryBot: Than McIntosh <thanm@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> Trust: Than McIntosh <thanm@google.com> |
||
Robert Griesemer
|
41e7901ca4 |
[dev.typeparams] cmd/compile/internal/types2: report error for invalid main function signature
Updates #43308. Change-Id: I2caff83f304c7e104edda76ac3623cce9fc94a8d Reviewed-on: https://go-review.googlesource.com/c/go/+/279552 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> |
||
Robert Griesemer
|
53c4c17b09 |
[dev.typeparams] all: merge dev.regabi into dev.typeparams
The files below had conflicts that required manual resolution. The unresolved conflict in noder.go was just in the import declaration (trivial). All the other conflicts are in tests where the ERROR regex patterns changed to accomodate gccgo error messages (incoming from dev.regabi), and to accomodate types2 in dev.typeparams. They were resolved by accepting the dev.regabi changes (so as not to lose them) and then by re- applying whatever changes needed to make them pass with types2. Finally, the new test mainsig.go was excluded from run.go when using types2 due to issue #43308. src/cmd/compile/internal/gc/noder.go test/fixedbugs/bug13343.go test/fixedbugs/bug462.go test/fixedbugs/issue10975.go test/fixedbugs/issue11326.go test/fixedbugs/issue11361.go test/fixedbugs/issue11371.go test/fixedbugs/issue11674.go test/fixedbugs/issue13365.go test/fixedbugs/issue13471.go test/fixedbugs/issue14136.go test/fixedbugs/issue14321.go test/fixedbugs/issue14729.go test/fixedbugs/issue15898.go test/fixedbugs/issue16439.go test/fixedbugs/issue17588.go test/fixedbugs/issue19323.go test/fixedbugs/issue19482.go test/fixedbugs/issue19880.go test/fixedbugs/issue20185.go test/fixedbugs/issue20227.go test/fixedbugs/issue20415.go test/fixedbugs/issue20749.go test/fixedbugs/issue22794.go test/fixedbugs/issue22822.go test/fixedbugs/issue22921.go test/fixedbugs/issue23823.go test/fixedbugs/issue25727.go test/fixedbugs/issue26616.go test/fixedbugs/issue28079c.go test/fixedbugs/issue28450.go test/fixedbugs/issue30085.go test/fixedbugs/issue30087.go test/fixedbugs/issue35291.go test/fixedbugs/issue38745.go test/fixedbugs/issue41247.go test/fixedbugs/issue41440.go test/fixedbugs/issue41500.go test/fixedbugs/issue4215.go test/fixedbugs/issue6402.go test/fixedbugs/issue6772.go test/fixedbugs/issue7129.go test/fixedbugs/issue7150.go test/fixedbugs/issue7153.go test/fixedbugs/issue7310.go test/fixedbugs/issue8183.go test/fixedbugs/issue8385.go test/fixedbugs/issue8438.go test/fixedbugs/issue8440.go test/fixedbugs/issue8507.go test/fixedbugs/issue9370.go test/fixedbugs/issue9521.go Change-Id: I26e6e326fde6e3fca5400711a253834d710ab7f4 |
||
Matthew Dempsky
|
ca8e17164e |
[dev.regabi] all: merge master into dev.regabi
The list of conflicted files for this merge is: src/cmd/compile/internal/gc/inl.go src/cmd/compile/internal/gc/order.go src/cmd/compile/internal/gc/ssa.go test/fixedbugs/issue20415.go test/fixedbugs/issue22822.go test/fixedbugs/issue28079b.go inl.go was updated for changes on dev.regabi: namely that OSELRECV has been removed, and that OSELRECV2 now only uses List, rather than both Left and List. order.go was updated IsAutoTmp is now a standalone function, rather than a method on Node. ssa.go was similarly updated for new APIs involving package ir. The tests are all merging upstream additions for gccgo error messages with changes to cmd/compile's error messages on the dev.regabi branch. Change-Id: Icaaf186d69da791b5994dbb6688ec989caabec42 |
||
Ian Lance Taylor
|
9abbe27710 |
test: skip issue11656.go on mips/mips64/ppc64
For #11656 For #43283 Change-Id: I1fcf2b24800f421e36201af43130b487abe605b1 Reviewed-on: https://go-review.googlesource.com/c/go/+/279312 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Run-TryBot: Emmanuel Odeke <emmanuel@orijtech.com> Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com> |
||
Matthew Dempsky
|
89b44b4e2b |
cmd/compile: recognize reassignments involving receives
Previously, reassigned was failing to detect reassignments due to channel receives in select statements (OSELRECV, OSELRECV2), or due to standalone 2-value receive assignments (OAS2RECV). This was reported as a devirtualization panic, but could have caused mis-inlining as well. Fixes #43292. Change-Id: Ic8079c20c0587aeacff9596697fdeba80a697b12 Reviewed-on: https://go-review.googlesource.com/c/go/+/279352 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> |
||
Ian Lance Taylor
|
55b58018f4 |
test: for issue11656 try to execute trap, not call it
The issue11656 code was using the trap instruction as a PC value, but it is intended to call a PC value that contains the trap instruction. It doesn't matter too much as in practice the address is not executable anyhow. But may as well have the code act the way it is documented to act. Also, don't run the test with gccgo/GoLLVM, as it can't work. The illegal instruction will have no unwind data, so the unwinder won't be able to get past it. In other words, gccgo/GoLLVM suffer from the exact problem that the issue describes, but it seems insoluble. For golang/go#11656 Change-Id: Ib2e50ffc91d215fd50e78f742fafe476c92d704e Reviewed-on: https://go-review.googlesource.com/c/go/+/278473 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> |
||
Ian Lance Taylor
|
626cc7c02d |
test: permit "exponent too large" error
The language spec only requires a signed binary exponent of 16 bits for floating point constants. Permit a "exponent too large" error for larger exponents. Don't run test 11326b with gccgo, as it requires successful compilation of floating point constants with exponents that don't fit in 16 bits. Change-Id: I98688160c76864aba525a151a14aaaf86bc36a6f Reviewed-on: https://go-review.googlesource.com/c/go/+/279252 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Griesemer <gri@golang.org> |
||
Ian Lance Taylor
|
f1778c28a9 |
test: recognize and use gc build tag
Change the run.go driver to recognize the "gc" build tag. Change existing tests to use the "gc" build tag if they use some feature that seems specific to the gc compiler, such as passing specific options to or expecting specific behavior from "go tool compile". Change tests to use the "!gccgo" build tag if they use "go build" or "go run", as while those might work with compilers other than gc, they won't work with the way that gccgo runs its testsuite (which happens independently of the go command). For #43252 Change-Id: I666e04b6d7255a77dfc256ee304094e3a6bb15ad Reviewed-on: https://go-review.googlesource.com/c/go/+/279052 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> |
||
Russ Cox
|
be64c8bece |
[dev.regabi] cmd/compile: cleanup for concrete types - noder
An automated rewrite will add concrete type assertions after a test of n.Op(), when n can be safely type-asserted (meaning, n is not reassigned a different type, n is not reassigned and then used outside the scope of the type assertion, and so on). This sequence of CLs handles the code that the automated rewrite does not: adding specific types to function arguments, adjusting code not to call n.Left() etc when n may have multiple representations, and so on. This CL focuses on noder.go. Passes buildall w/ toolstash -cmp. Change-Id: Ie870126b51558e83c738add8e91a2804ed6d7f92 Reviewed-on: https://go-review.googlesource.com/c/go/+/277931 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> |
||
Russ Cox
|
4dfc7333f4 |
[dev.regabi] cmd/compile: update ir/fmt for concrete types
An automated rewrite will add concrete type assertions after a test of n.Op(), when n can be safely type-asserted (meaning, n is not reassigned a different type, n is not reassigned and then used outside the scope of the type assertion, and so on). This sequence of CLs handles the code that the automated rewrite does not: adding specific types to function arguments, adjusting code not to call n.Left() etc when n may have multiple representations, and so on. This CL handles package fmt. There are various type assertions but also some rewriting to lean more heavily on reflection. Passes buildall w/ toolstash -cmp. Change-Id: I503467468b42ace11bff2ba014b03cfa345e6d03 Reviewed-on: https://go-review.googlesource.com/c/go/+/277915 Trust: Russ Cox <rsc@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com> |
||
Ian Lance Taylor
|
731bb54038 |
test: update for gofrontend error message changes
fixedbugs/bug195.go:9:20: error: interface contains embedded non-interface fixedbugs/bug195.go:12:20: error: interface contains embedded non-interface fixedbugs/bug195.go:15:22: error: interface contains embedded non-interface fixedbugs/bug195.go:18:9: error: invalid recursive interface fixedbugs/bug195.go:26:9: error: invalid recursive interface fixedbugs/bug251.go:15:9: error: invalid recursive interface fixedbugs/issue23823.go:15:9: error: invalid recursive interface Change-Id: If4c22430557459d5b361beda7168f8cb42b58811 Reviewed-on: https://go-review.googlesource.com/c/go/+/278512 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> TryBot-Result: Go Bot <gobot@golang.org> |
||
Ian Lance Taylor
|
685a322fe4 |
test: match gofrontend error messages
fixedbugs/issue11614.go:14:9: error: interface contains embedded non-interface fixedbugs/issue11614.go:22:20: error: interface contains embedded non-interface Change-Id: Ie9875916697833f5fa28ab890218851a741120ac Reviewed-on: https://go-review.googlesource.com/c/go/+/278175 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> |
||
Ian Lance Taylor
|
3d6467824c |
test: only require issue11674 errors with gc compiler
The gofrontend code sees that the denominator is not zero, so it computes the values. Dividing zero by a non-zero value produces zero. The language spec doesn't require any of these cases to report an error, so make the errors compiler-specific. Change-Id: I5ed759a3121e38b937744d32250adcbdf2c4d3c2 Reviewed-on: https://go-review.googlesource.com/c/go/+/278117 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> |
||
Ian Lance Taylor
|
7cdc84a15b |
test: remove bug429 (duplicates runtime.TestSimpleDeadlock)
The bug429 tests is an exact duplicate of TestSimpleDeadlock in the runtime package. The runtime package is the right place for this test, and the version in the runtime package will run faster as the build step is combined with other runtime package tests. Change-Id: I6538d24e6df8e8c5e3e399d3ff37d68f3e52be56 Reviewed-on: https://go-review.googlesource.com/c/go/+/278173 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> |
||
Ian Lance Taylor
|
412dc2f4d3 |
test: adjust issue11371 to fit in required precision
The language spec only requires that floating point values be represented with 256 bits, which is about 1e75. The issue11371 test was assuming that the compiler could represent 1e100. Adjusting the test so that it only assumes 256 bits of precision still keeps the test valid, and permits it to pass when using the gofrontend. Change-Id: I9d1006e9adc9438277f4b8002488c912e5d61cc1 Reviewed-on: https://go-review.googlesource.com/c/go/+/278116 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> |
||
Ian Lance Taylor
|
8e2d74b705 |
test: only check for issue11362 error with gc
With the gc compiler the import path implies the package path, so keeping a canonical path is important. With the gofrontend this is not the case, so we don't need to report this as a bug. Change-Id: I245e34f9b66383bd17e79438d4b002a3e20aa994 Reviewed-on: https://go-review.googlesource.com/c/go/+/278115 Trust: Ian Lance Taylor <iant@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> |
||
Ian Lance Taylor
|
f8ac237032 |
test: import file name for issue19028
The pattern in NNN.dir directories is that if we have a.go, the other files import "./a". For gc it happens to work to use a path, but not for gofrontend. Better to be consistent. Change-Id: I2e023cbf6bd115f9fb77427b097b0ff9b9992f17 Reviewed-on: https://go-review.googlesource.com/c/go/+/278113 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> |
||
Robert Griesemer
|
14e4267c34 |
[dev.typeparams] cmd/compile/internal/types2: report error for invalid (but empty) expr switch
Enable one more errorcheck test. Updates #43110. Updates #43200. Change-Id: Ib7b971d5e9989c65320579f75d65266bbbbeec53 Reviewed-on: https://go-review.googlesource.com/c/go/+/278132 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> |
||
Matthew Dempsky
|
4c2d66f642 |
[dev.regabi] cmd/compile: use ir.Ident for imported identifiers
This CL substantially reworks how imported declarations are handled, and fixes a number of issues with dot imports. In particular: 1. It eliminates the stub ir.Name declarations that are created upfront during import-declaration processing, allowing this to be deferred to when the declarations are actually needed. (Eventually, this can be deferred even further so we never have to create ir.Names w/ ONONAME, but this CL is already invasive/subtle enough.) 2. During noding, we now use ir.Idents to represent uses of imported declarations, including of dot-imported declarations. 3. Unused dot imports are now reported after type checking, so that we can correctly distinguish whether composite literal keys are a simple identifier (struct literals) or expressions (array/slice/map literals) and whether it might be a use of a dot-imported declaration. 4. It changes the "redeclared" error messages to report the previous position information in the same style as other compiler error messages that reference other source lines. Passes buildall w/ toolstash -cmp. Fixes #6428. Fixes #43164. Fixes #43167. Updates #42990. Change-Id: I40a0a780ec40daf5700fbc3cfeeb7300e1055981 Reviewed-on: https://go-review.googlesource.com/c/go/+/277713 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> |
||
Ian Lance Taylor
|
5a25a3fd1d |
test: recognize gofrontend error messages
fixedbugs/issue26416.go:24:16: error: unknown field ‘t1f1’ in ‘t2’ fixedbugs/issue26416.go:25:16: error: unknown field ‘t1f2’ in ‘t3’ fixedbugs/issue26416.go:26:16: error: unknown field ‘t2f1’ in ‘t3’ fixedbugs/issue26616.go:15:9: error: single variable set to multiple-value function call fixedbugs/issue26616.go:9:5: error: incompatible type in initialization (multiple-value function call in single-value context) fixedbugs/issue26616.go:12:13: error: incompatible type in initialization (multiple-value function call in single-value context) fixedbugs/issue26616.go:13:13: error: incompatible type in initialization (multiple-value function call in single-value context) fixedbugs/issue26616.go:15:9: error: incompatible type in initialization (multiple-value function call in single-value context) fixedbugs/issue26616.go:14:11: error: incompatible types in assignment (multiple-value function call in single-value context) fixedbugs/issue26855.go:23:12: error: incompatible type for field 1 in struct construction fixedbugs/issue26855.go:27:12: error: incompatible type for field 1 in struct construction fixedbugs/issue25958.go:14:18: error: expected ‘<-’ or ‘=’ fixedbugs/issue25958.go:15:35: error: expected ‘<-’ or ‘=’ fixedbugs/issue28079b.go:13:9: error: array bound is not constant fixedbugs/issue28079b.go:16:22: error: invalid context-determined non-integer type for left operand of shift fixedbugs/issue28079c.go:14:22: error: invalid context-determined non-integer type for left operand of shift fixedbugs/issue28450.go:9:19: error: ‘...’ only permits one name fixedbugs/issue28450.go:10:18: error: ‘...’ must be last parameter fixedbugs/issue28450.go:11:16: error: ‘...’ must be last parameter fixedbugs/issue28450.go:11:24: error: ‘...’ must be last parameter fixedbugs/issue28450.go:13:25: error: ‘...’ must be last parameter fixedbugs/issue28450.go:15:19: error: ‘...’ must be last parameter fixedbugs/issue28450.go:16:21: error: ‘...’ must be last parameter fixedbugs/issue28450.go:16:31: error: ‘...’ must be last parameter fixedbugs/issue28268.go:20:1: error: method ‘E’ redeclares struct field name fixedbugs/issue28268.go:19:1: error: method ‘b’ redeclares struct field name fixedbugs/issue27356.go:14:14: error: expected function fixedbugs/issue27356.go:18:9: error: expected function fixedbugs/issue29855.go:13:11: error: unknown field ‘Name’ in ‘T’ fixedbugs/issue27938.go:14:15: error: expected package fixedbugs/issue27938.go:18:13: error: expected package fixedbugs/issue27938.go:22:13: error: expected package fixedbugs/issue27938.go:22:9: error: expected signature or type name fixedbugs/issue29870b.go:13:9: error: ‘x’ declared but not used fixedbugs/issue30085.go:10:18: error: wrong number of initializations fixedbugs/issue30085.go:11:21: error: wrong number of initializations fixedbugs/issue30087.go:10:18: error: wrong number of initializations fixedbugs/issue30087.go:11:11: error: number of variables does not match number of values fixedbugs/issue30087.go:12:9: error: wrong number of initializations fixedbugs/issue30087.go:13:9: error: wrong number of initializations fixedbugs/issue28926.go:16:14: error: use of undefined type ‘G’ fixedbugs/issue28926.go:18:14: error: use of undefined type ‘E’ fixedbugs/issue28926.go:22:24: error: use of undefined type ‘T’ fixedbugs/issue30722.go:13:13: error: invalid numeric literal fixedbugs/issue30722.go:14:13: error: invalid numeric literal fixedbugs/issue30722.go:15:13: error: invalid numeric literal fixedbugs/issue33308.go:12:19: error: invalid context-determined non-integer type for left operand of shift fixedbugs/issue33386.go:16:9: error: expected operand fixedbugs/issue33386.go:22:9: error: expected operand fixedbugs/issue33386.go:26:17: error: expected operand fixedbugs/issue33386.go:27:18: error: expected operand fixedbugs/issue33386.go:28:29: error: expected operand fixedbugs/issue33386.go:15:17: error: reference to undefined name ‘send’ fixedbugs/issue33386.go:27:13: error: reference to undefined name ‘a’ fixedbugs/issue33386.go:21:19: error: value computed is not used fixedbugs/issue33460.go:34:10: error: duplicate key in map literal fixedbugs/issue33460.go:21:9: error: duplicate case in switch fixedbugs/issue33460.go:24:9: error: duplicate case in switch fixedbugs/issue33460.go:25:9: error: duplicate case in switch fixedbugs/issue32723.go:12:14: error: invalid comparison of non-ordered type fixedbugs/issue32723.go:13:13: error: invalid comparison of non-ordered type fixedbugs/issue32723.go:16:16: error: invalid comparison of non-ordered type fixedbugs/issue32723.go:17:16: error: invalid comparison of non-ordered type fixedbugs/issue32723.go:18:15: error: invalid comparison of non-ordered type fixedbugs/issue32723.go:21:15: error: invalid comparison of non-ordered type fixedbugs/issue35291.go:13:9: error: duplicate value for index 1 fixedbugs/issue38745.go:12:12: error: reference to undefined field or method ‘M’ fixedbugs/issue38745.go:13:16: error: reference to undefined field or method ‘M’ fixedbugs/issue38745.go:17:19: error: reference to undefined field or method ‘M’ fixedbugs/issue38745.go:17:9: error: not enough arguments to return fixedbugs/issue41500.go:16:22: error: incompatible types in binary expression fixedbugs/issue41500.go:17:26: error: incompatible types in binary expression fixedbugs/issue41500.go:18:22: error: incompatible types in binary expression fixedbugs/issue41500.go:19:26: error: incompatible types in binary expression fixedbugs/issue41575.go:23:6: error: invalid recursive type fixedbugs/issue41575.go:9:6: error: invalid recursive type ‘T1’ fixedbugs/issue41575.go:13:6: error: invalid recursive type ‘T2’ fixedbugs/issue41575.go:17:6: error: invalid recursive type ‘a’ fixedbugs/issue41575.go:18:6: error: invalid recursive type ‘b’ fixedbugs/issue41575.go:19:6: error: invalid recursive type ‘c’ fixedbugs/issue41575.go:25:6: error: invalid recursive type ‘g’ fixedbugs/issue41575.go:32:6: error: invalid recursive type ‘x’ fixedbugs/issue41575.go:33:6: error: invalid recursive type ‘y’ fixedbugs/issue4215.go:10:9: error: not enough arguments to return fixedbugs/issue4215.go:14:9: error: return with value in function with no return type fixedbugs/issue4215.go:19:17: error: not enough arguments to return fixedbugs/issue4215.go:21:9: error: not enough arguments to return fixedbugs/issue4215.go:27:17: error: not enough arguments to return fixedbugs/issue4215.go:29:17: error: too many values in return statement fixedbugs/issue4215.go:31:17: error: not enough arguments to return fixedbugs/issue4215.go:43:17: error: not enough arguments to return fixedbugs/issue4215.go:46:17: error: not enough arguments to return fixedbugs/issue4215.go:48:9: error: too many values in return statement fixedbugs/issue4215.go:52:9: error: too many values in return statement fixedbugs/issue41247.go:10:16: error: incompatible type for return value 1 fixedbugs/issue41440.go:13:9: error: too many arguments fixedbugs/issue6772.go:10:16: error: ‘a’ repeated on left side of := fixedbugs/issue6772.go:17:16: error: ‘a’ repeated on left side of := fixedbugs/issue6402.go:12:16: error: incompatible type for return value 1 fixedbugs/issue6403.go:13:23: error: reference to undefined identifier ‘syscall.X’ fixedbugs/issue6403.go:14:15: error: reference to undefined name ‘voidpkg’ fixedbugs/issue7746.go:24:20: error: constant multiplication overflow fixedbugs/issue7760.go:15:7: error: invalid constant type fixedbugs/issue7760.go:16:7: error: invalid constant type fixedbugs/issue7760.go:18:7: error: invalid constant type fixedbugs/issue7760.go:19:7: error: invalid constant type fixedbugs/issue7760.go:21:11: error: expression is not constant fixedbugs/issue7760.go:22:11: error: expression is not constant fixedbugs/issue7760.go:24:7: error: invalid constant type fixedbugs/issue7760.go:25:7: error: invalid constant type fixedbugs/issue7129.go:18:11: error: argument 1 has incompatible type (cannot use type bool as type int) fixedbugs/issue7129.go:19:11: error: argument 1 has incompatible type (cannot use type bool as type int) fixedbugs/issue7129.go:20:11: error: argument 1 has incompatible type (cannot use type bool as type int) fixedbugs/issue7129.go:20:17: error: argument 2 has incompatible type (cannot use type bool as type int) fixedbugs/issue7150.go:12:20: error: index expression is negative fixedbugs/issue7150.go:13:13: error: some element keys in composite literal are out of range fixedbugs/issue7150.go:14:13: error: some element keys in composite literal are out of range fixedbugs/issue7150.go:15:13: error: some element keys in composite literal are out of range fixedbugs/issue7150.go:16:13: error: some element keys in composite literal are out of range fixedbugs/issue7675.go:16:11: error: argument 1 has incompatible type (cannot use type int as type string) fixedbugs/issue7675.go:16:24: error: argument 3 has incompatible type (cannot use type string as type float64) fixedbugs/issue7675.go:16:9: error: not enough arguments fixedbugs/issue7675.go:16:14: error: floating-point constant truncated to integer fixedbugs/issue7675.go:18:11: error: argument 1 has incompatible type (cannot use type int as type string) fixedbugs/issue7675.go:18:24: error: argument 3 has incompatible type (cannot use type string as type float64) fixedbugs/issue7675.go:18:28: error: argument 4 has incompatible type (cannot use type int as type string) fixedbugs/issue7675.go:18:9: error: too many arguments fixedbugs/issue7675.go:18:14: error: floating-point constant truncated to integer fixedbugs/issue7675.go:19:11: error: argument 1 has incompatible type (cannot use type int as type string) fixedbugs/issue7675.go:19:9: error: not enough arguments fixedbugs/issue7675.go:19:14: error: floating-point constant truncated to integer fixedbugs/issue7675.go:21:11: error: argument 1 has incompatible type (cannot use type int as type string) fixedbugs/issue7675.go:21:19: error: argument 3 has incompatible type fixedbugs/issue7675.go:21:14: error: floating-point constant truncated to integer fixedbugs/issue7675.go:23:14: error: floating-point constant truncated to integer fixedbugs/issue7153.go:11:15: error: reference to undefined name ‘a’ fixedbugs/issue7153.go:11:18: error: incompatible type for element 1 in composite literal fixedbugs/issue7153.go:11:24: error: incompatible type for element 2 in composite literal fixedbugs/issue7310.go:12:13: error: left argument must be a slice fixedbugs/issue7310.go:13:13: error: second argument must be slice or string fixedbugs/issue7310.go:14:15: error: incompatible types in binary expression fixedbugs/issue6964.go:10:13: error: invalid type conversion (cannot use type complex128 as type string) fixedbugs/issue7538a.go:14:9: error: reference to undefined label ‘_’ fixedbugs/issue8311.go:14:9: error: increment or decrement of non-numeric type fixedbugs/issue8507.go:12:6: error: invalid recursive type ‘T’ fixedbugs/issue9521.go:16:20: error: argument 2 has incompatible type fixedbugs/issue9521.go:17:20: error: argument 2 has incompatible type (cannot use type float64 as type int) fixedbugs/issue8385.go:30:19: error: argument 1 has incompatible type (type has no methods) fixedbugs/issue8385.go:30:14: error: not enough arguments fixedbugs/issue8385.go:35:9: error: not enough arguments fixedbugs/issue8385.go:36:9: error: not enough arguments fixedbugs/issue8385.go:37:10: error: not enough arguments fixedbugs/issue8385.go:38:10: error: not enough arguments fixedbugs/issue8385.go:39:10: error: not enough arguments fixedbugs/issue8385.go:40:10: error: not enough arguments fixedbugs/issue8385.go:41:13: error: not enough arguments fixedbugs/issue8438.go:13:23: error: incompatible type for element 1 in composite literal fixedbugs/issue8438.go:14:22: error: incompatible type for element 1 in composite literal fixedbugs/issue8438.go:15:23: error: incompatible type for element 1 in composite literal fixedbugs/issue8440.go:10:9: error: reference to undefined name ‘n’ Change-Id: I5707aec7d3c9178c4f4d794d4827fc907b52efb3 Reviewed-on: https://go-review.googlesource.com/c/go/+/278032 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cherry Zhang <cherryyz@google.com> |
||
Robert Griesemer
|
5aca6e7857 |
[dev.typeparams] test: finish triaging all outstanding failing tests
Also: Adjusted error patterns for passing test that have different error messages. Change-Id: I216294b4c4855aa93da22cdc3c0b3303e54a8420 Reviewed-on: https://go-review.googlesource.com/c/go/+/277994 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> |
||
Robert Griesemer
|
df58f3368e |
[dev.typeparams] cmd/compile/internal/types2: don't report two errors for bad strings
If the parser reported an error for (string) literals, don't report a second error during type checking. This should have a couple of tests but they are tricky to arrange with the current testing framework as the ERROR comment cannot be on the line where the string. But the change is straightforward and we have test/fixedbugs/issue32133.go that is passing now. Change-Id: I0cd7f002b04e4092b8eb66009c7413288c8bfb23 Reviewed-on: https://go-review.googlesource.com/c/go/+/277993 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> TryBot-Result: Go Bot <gobot@golang.org> |
||
Robert Griesemer
|
91803a2df3 |
[dev.typeparams] merge: merge branch 'dev.regabi' into 'dev.typeparams'
The following files had merge conflicts and were merged manually: src/cmd/compile/fmtmap_test.go src/cmd/compile/internal/gc/noder.go src/go/parser/error_test.go test/assign.go test/chan/perm.go test/fixedbugs/issue22822.go test/fixedbugs/issue4458.go test/init.go test/interface/explicit.go test/map1.go test/method2.go The following files had manual changes to make tests pass: test/run.go test/used.go src/cmd/compile/internal/types2/stdlib_test.go Change-Id: Ia495aaaa80ce321ee4ec2a9105780fbe913dbd4c |
||
Ian Lance Taylor
|
be10af7c4e |
test: match gofrontend error messages
fixedbugs/issue20602.go:13:9: error: argument must have complex type fixedbugs/issue20602.go:14:9: error: argument must have complex type fixedbugs/issue19323.go:12:12: error: attempt to slice object that is not array, slice, or string fixedbugs/issue19323.go:18:13: error: attempt to slice object that is not array, slice, or string fixedbugs/issue20749.go:12:11: error: array index out of bounds fixedbugs/issue20749.go:15:11: error: array index out of bounds fixedbugs/issue20415.go:14:5: error: redefinition of ‘f’ fixedbugs/issue20415.go:12:5: note: previous definition of ‘f’ was here fixedbugs/issue20415.go:25:5: error: redefinition of ‘g’ fixedbugs/issue20415.go:20:5: note: previous definition of ‘g’ was here fixedbugs/issue20415.go:33:5: error: redefinition of ‘h’ fixedbugs/issue20415.go:31:5: note: previous definition of ‘h’ was here fixedbugs/issue19977.go:12:21: error: reference to undefined name ‘a’ fixedbugs/issue20812.go:10:13: error: invalid type conversion (cannot use type string as type int) fixedbugs/issue20812.go:11:13: error: invalid type conversion (cannot use type int as type bool) fixedbugs/issue20812.go:12:13: error: invalid type conversion (cannot use type string as type bool) fixedbugs/issue20812.go:13:13: error: invalid type conversion (cannot use type bool as type int) fixedbugs/issue20812.go:14:13: error: invalid type conversion (cannot use type bool as type string) fixedbugs/issue21256.go:9:5: error: redefinition of ‘main’ fixedbugs/issue20813.go:10:11: error: invalid left hand side of assignment fixedbugs/issue20185.go:22:16: error: ‘t’ declared but not used fixedbugs/issue20185.go:13:9: error: cannot type switch on non-interface value fixedbugs/issue20185.go:22:9: error: cannot type switch on non-interface value fixedbugs/issue20227.go:11:11: error: division by zero fixedbugs/issue20227.go:12:12: error: division by zero fixedbugs/issue20227.go:13:12: error: division by zero fixedbugs/issue20227.go:15:11: error: division by zero fixedbugs/issue20227.go:16:12: error: division by zero fixedbugs/issue19880.go:14:13: error: invalid use of type fixedbugs/issue23093.go:9:5: error: initialization expression for ‘f’ depends upon itself fixedbugs/issue21979.go:29:13: error: integer constant overflow fixedbugs/issue21979.go:39:13: error: complex constant truncated to floating-point fixedbugs/issue21979.go:10:13: error: invalid type conversion (cannot use type string as type bool) fixedbugs/issue21979.go:11:13: error: invalid type conversion (cannot use type int as type bool) fixedbugs/issue21979.go:12:13: error: invalid type conversion (cannot use type float64 as type bool) fixedbugs/issue21979.go:13:13: error: invalid type conversion (cannot use type complex128 as type bool) fixedbugs/issue21979.go:15:13: error: invalid type conversion (cannot use type bool as type string) fixedbugs/issue21979.go:17:13: error: invalid type conversion (cannot use type float64 as type string) fixedbugs/issue21979.go:18:13: error: invalid type conversion (cannot use type complex128 as type string) fixedbugs/issue21979.go:20:13: error: invalid type conversion (cannot use type string as type int) fixedbugs/issue21979.go:21:13: error: invalid type conversion (cannot use type bool as type int) fixedbugs/issue21979.go:27:13: error: invalid type conversion (cannot use type string as type uint) fixedbugs/issue21979.go:28:13: error: invalid type conversion (cannot use type bool as type uint) fixedbugs/issue21979.go:34:13: error: invalid type conversion (cannot use type string as type float64) fixedbugs/issue21979.go:35:13: error: invalid type conversion (cannot use type bool as type float64) fixedbugs/issue21979.go:41:13: error: invalid type conversion (cannot use type string as type complex128) fixedbugs/issue21979.go:42:13: error: invalid type conversion (cannot use type bool as type complex128) fixedbugs/issue21988.go:11:11: error: reference to undefined name ‘Wrong’ fixedbugs/issue22063.go:11:11: error: reference to undefined name ‘Wrong’ fixedbugs/issue22904.go:12:6: error: invalid recursive type ‘a’ fixedbugs/issue22904.go:13:6: error: invalid recursive type ‘b’ fixedbugs/issue22921.go:11:16: error: reference to undefined identifier ‘bytes.nonexist’ fixedbugs/issue22921.go:13:19: error: reference to undefined identifier ‘bytes.nonexist’ fixedbugs/issue22921.go:13:19: error: expected signature or type name fixedbugs/issue22921.go:17:15: error: reference to undefined identifier ‘bytes.buffer’ fixedbugs/issue23823.go:15:9: error: invalid recursive interface fixedbugs/issue23823.go:10:9: error: invalid recursive interface fixedbugs/issue23732.go:24:13: error: too few expressions for struct fixedbugs/issue23732.go:34:17: error: too many expressions for struct fixedbugs/issue23732.go:37:13: error: too few expressions for struct fixedbugs/issue23732.go:40:17: error: too many expressions for struct fixedbugs/issue22794.go:16:14: error: reference to undefined field or method ‘floats’ fixedbugs/issue22794.go:18:19: error: unknown field ‘floats’ in ‘it’ fixedbugs/issue22794.go:19:17: error: unknown field ‘InneR’ in ‘it’ fixedbugs/issue22794.go:18:9: error: ‘i2’ declared but not used fixedbugs/issue22822.go:15:17: error: expected function fixedbugs/issue25727.go:12:10: error: reference to unexported field or method ‘doneChan’ fixedbugs/issue25727.go:13:10: error: reference to undefined field or method ‘DoneChan’ fixedbugs/issue25727.go:14:21: error: unknown field ‘tlsConfig’ in ‘http.Server’ fixedbugs/issue25727.go:15:21: error: unknown field ‘DoneChan’ in ‘http.Server’ fixedbugs/issue25727.go:21:14: error: unknown field ‘bAr’ in ‘foo’ Change-Id: I32ce0b7d80017b2367b8fb479a881632240d4161 Reviewed-on: https://go-review.googlesource.com/c/go/+/277455 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> |
||
Ian Lance Taylor
|
ce61ccca8f |
test: match gofrontend error messages
fixedbugs/issue14136.go:17:16: error: unknown field ‘X’ in ‘T’ fixedbugs/issue14136.go:18:13: error: incompatible type in initialization (cannot use type int as type string) fixedbugs/issue14520.go:9:37: error: import path contains control character fixedbugs/issue14520.go:14:2: error: expected ‘)’ fixedbugs/issue14520.go:14:3: error: expected declaration fixedbugs/issue14652.go:9:7: error: use of undefined type ‘any’ fixedbugs/issue14729.go:13:17: error: embedded type may not be a pointer fixedbugs/issue15514.dir/c.go:10: error: incompatible type in initialization fixedbugs/issue15898.go:11:9: error: duplicate type in switch fixedbugs/issue15898.go:16:9: error: duplicate type in switch fixedbugs/issue16439.go:10:21: error: index expression is negative fixedbugs/issue16439.go:13:21: error: index expression is negative fixedbugs/issue16439.go:16:21: error: index expression is not integer constant fixedbugs/issue16439.go:18:22: error: index expression is not integer constant fixedbugs/issue17328.go:11:20: error: expected ‘{’ fixedbugs/issue17328.go:11:20: error: expected ‘;’ or ‘}’ or newline fixedbugs/issue17328.go:13:1: error: expected declaration fixedbugs/issue17588.go:14:15: error: expected type fixedbugs/issue17631.go:20:17: error: unknown field ‘updates’ in ‘unnamed struct’ fixedbugs/issue17645.go:15:13: error: incompatible type in initialization fixedbugs/issue17758.go:13:1: error: redefinition of ‘foo’ fixedbugs/issue17758.go:9:1: note: previous definition of ‘foo’ was here fixedbugs/issue18092.go:13:19: error: expected colon fixedbugs/issue18231.go:17:12: error: may only omit types within composite literals of slice, array, or map type fixedbugs/issue18393.go:24:38: error: expected type fixedbugs/issue18419.dir/test.go:12: error: reference to unexported field or method 'member' fixedbugs/issue18655.go:14:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:15:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:16:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:17:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:18:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:20:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:21:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18655.go:22:1: error: redefinition of ‘m’ fixedbugs/issue18655.go:13:1: note: previous definition of ‘m’ was here fixedbugs/issue18915.go:13:20: error: expected ‘;’ after statement in if expression fixedbugs/issue18915.go:16:21: error: parse error in for statement fixedbugs/issue18915.go:19:24: error: expected ‘;’ after statement in switch expression fixedbugs/issue18915.go:13:12: error: ‘a’ declared but not used fixedbugs/issue18915.go:16:13: error: ‘b’ declared but not used fixedbugs/issue18915.go:19:16: error: ‘c’ declared but not used fixedbugs/issue19012.go:16:17: error: return with value in function with no return type fixedbugs/issue19012.go:18:9: error: return with value in function with no return type fixedbugs/issue19012.go:22:16: error: argument 2 has incompatible type (cannot use type bool as type uint) fixedbugs/issue19012.go:22:9: error: too many arguments fixedbugs/issue19012.go:22:16: error: incompatible types in binary expression fixedbugs/issue19012.go:24:9: error: too many arguments fixedbugs/issue19056.go:9:9: error: expected operand fixedbugs/issue19056.go:9:9: error: expected ‘;’ or newline after top level declaration fixedbugs/issue19482.go:25:15: error: expected struct field name fixedbugs/issue19482.go:27:15: error: expected struct field name fixedbugs/issue19482.go:31:19: error: expected struct field name fixedbugs/issue19482.go:33:15: error: expected struct field name fixedbugs/issue19667.go:13:1: error: expected operand fixedbugs/issue19667.go:13:1: error: missing ‘)’ fixedbugs/issue19667.go:13:105: error: expected ‘;’ after statement in if expression fixedbugs/issue19667.go:13:105: error: expected ‘{’ fixedbugs/issue19667.go:12:19: error: reference to undefined name ‘http’ Change-Id: Ia9c75b9c78671f354f0a0623dbc075157ef8f181 Reviewed-on: https://go-review.googlesource.com/c/go/+/277433 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> |
||
Matthew Dempsky
|
9c5241e520 |
[dev.regabi] cmd/compile: remove unnecessary String methods
There were only a few places these were still used, none of which justify generating all this code. Instead rewrite them to use fmt.Sprint or simpler means. Passes buildall w/ toolstash -cmp. Change-Id: Ibd123a1696941a597f0cb4dcc96cda8ced672140 Reviewed-on: https://go-review.googlesource.com/c/go/+/276072 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Russ Cox <rsc@golang.org> |
||
Alexander Rakoczy
|
267975dc47 |
Merge branch 'master' into dev.regabi
Change-Id: I098acdbc5e2676aeb8700d935e796a9c29d04b88 |
||
Cuong Manh Le
|
0a02371b05 |
cmd/compile: set correct type for OpIData
Since CL 270057, there're many attempts to fix the expand_calls pass with interface{}-typed. But all of them did not fix the root cause. The main issue is during SSA conversion in gc/ssa.go, for empty interface case, we make its type as n.Type, instead of BytePtr. To fix these, we can just use BytePtr for now, since when itab fields are treated as scalar. No significal changes on compiler speed, size. cmd/compile/internal/ssa expandCalls.func6 9488 -> 9232 (-2.70%) file before after Δ % cmd/compile/internal/ssa.s 3992893 3992637 -256 -0.006% total 20500447 20500191 -256 -0.001% Fixes #43112 Updates #42784 Updates #42727 Updates #42568 Change-Id: I0b15d9434e0be5448453e61f98ef9c2d6cd93792 Reviewed-on: https://go-review.googlesource.com/c/go/+/276952 Trust: Cuong Manh Le <cuong.manhle.vn@gmail.com> Run-TryBot: Cuong Manh Le <cuong.manhle.vn@gmail.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Keith Randall <khr@golang.org> |
||
Matthew Dempsky
|
14305527f6 |
cmd/compile: fix select statement evaluation order corner case
The Go spec requires that select case clauses be evaluated in order, which is stricter than normal ordering semantics. cmd/compile handled this correctly for send clauses, but was not correctly handling receive clauses that involved bare variable references. Discovered with @cuonglm. Fixes #43111. Change-Id: Iec93b6514dd771875b084ba49c15d7f4531b4a6f Reviewed-on: https://go-review.googlesource.com/c/go/+/277132 Trust: Matthew Dempsky <mdempsky@google.com> Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Cuong Manh Le <cuong.manhle.vn@gmail.com> Reviewed-by: Keith Randall <khr@golang.org> |
||
Ian Lance Taylor
|
6d2b3351f6 |
test: match gofrontend error messages
fixedbugs/bug13343.go:10:12: error: initialization expressions for ‘b’ and ‘c’ depend upon each other fixedbugs/bug13343.go:11:9: note: ‘c’ defined here fixedbugs/bug13343.go:11:9: error: initialization expression for ‘c’ depends upon itself fixedbugs/bug13343.go:11:9: error: initialization expressions for ‘c’ and ‘b’ depend upon each other fixedbugs/bug13343.go:10:12: note: ‘b’ defined here fixedbugs/issue10700.dir/test.go:24:10: error: reference to method ‘Do’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:25:10: error: reference to method ‘do’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:27:10: error: reference to method ‘Dont’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:28:13: error: reference to undefined field or method ‘Dont’ fixedbugs/issue10700.dir/test.go:31:10: error: reference to undefined field or method ‘do’ fixedbugs/issue10700.dir/test.go:33:13: error: reference to undefined field or method ‘do’ fixedbugs/issue10700.dir/test.go:34:10: error: reference to undefined field or method ‘Dont’ fixedbugs/issue10700.dir/test.go:35:13: error: reference to undefined field or method ‘Dont’ fixedbugs/issue10700.dir/test.go:37:10: error: reference to method ‘Do’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:38:10: error: reference to method ‘do’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:40:13: error: reference to undefined field or method ‘do’ fixedbugs/issue10700.dir/test.go:41:10: error: reference to method ‘Dont’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:42:13: error: reference to undefined field or method ‘Dont’ fixedbugs/issue10700.dir/test.go:43:10: error: reference to method ‘secret’ in type that is pointer to interface, not interface fixedbugs/issue10700.dir/test.go:44:13: error: reference to unexported field or method ‘secret’ fixedbugs/issue10975.go:13:9: error: interface contains embedded non-interface fixedbugs/issue11326.go:26:17: error: floating-point constant overflow fixedbugs/issue11326.go:27:17: error: floating-point constant overflow fixedbugs/issue11326.go:28:17: error: floating-point constant overflow fixedbugs/issue11361.go:9:11: error: import file ‘fmt’ not found fixedbugs/issue11361.go:11:11: error: reference to undefined name ‘fmt’ fixedbugs/issue11371.go:12:15: error: floating-point constant truncated to integer fixedbugs/issue11371.go:13:15: error: integer constant overflow fixedbugs/issue11371.go:17:15: error: floating-point constant truncated to integer fixedbugs/issue11590.go:9:17: error: integer constant overflow fixedbugs/issue11590.go:9:17: error: integer constant overflow fixedbugs/issue11590.go:10:22: error: complex real part overflow fixedbugs/issue11590.go:10:22: error: complex real part overflow fixedbugs/issue11590.go:11:23: error: complex real part overflow fixedbugs/issue11590.go:11:23: error: complex real part overflow fixedbugs/issue11590.go:9:19: error: integer constant overflow fixedbugs/issue11590.go:10:24: error: complex real part overflow fixedbugs/issue11590.go:11:25: error: complex real part overflow fixedbugs/issue11610.go:11:7: error: import path is empty fixedbugs/issue11610.go:12:4: error: invalid character 0x3f in input file fixedbugs/issue11610.go:14:1: error: expected identifier fixedbugs/issue11610.go:14:1: error: expected type fixedbugs/issue11614.go:14:9: error: interface contains embedded non-interface fixedbugs/issue13248.go:13:1: error: expected operand fixedbugs/issue13248.go:13:1: error: missing ‘)’ fixedbugs/issue13248.go:12:5: error: reference to undefined name ‘foo’ fixedbugs/issue13266.go:10:8: error: package name must be an identifier fixedbugs/issue13266.go:10:8: error: expected ‘;’ or newline after package clause fixedbugs/issue13266.go:10:8: error: expected declaration fixedbugs/issue13273.go:50:18: error: expected ‘chan’ fixedbugs/issue13273.go:53:24: error: expected ‘chan’ fixedbugs/issue13274.go:11:58: error: expected ‘}’ fixedbugs/issue13365.go:14:19: error: index expression is negative fixedbugs/issue13365.go:15:21: error: index expression is negative fixedbugs/issue13365.go:16:22: error: index expression is negative fixedbugs/issue13365.go:19:13: error: some element keys in composite literal are out of range fixedbugs/issue13365.go:22:19: error: incompatible type for element 1 in composite literal fixedbugs/issue13365.go:23:21: error: incompatible type for element 1 in composite literal fixedbugs/issue13365.go:24:22: error: incompatible type for element 1 in composite literal fixedbugs/issue13415.go:14:5: error: redefinition of ‘x’ fixedbugs/issue13415.go:14:5: note: previous definition of ‘x’ was here fixedbugs/issue13415.go:14:5: error: ‘x’ declared but not used fixedbugs/issue13471.go:12:25: error: floating-point constant truncated to integer fixedbugs/issue13471.go:13:25: error: floating-point constant truncated to integer fixedbugs/issue13471.go:14:25: error: floating-point constant truncated to integer fixedbugs/issue13471.go:15:24: error: floating-point constant truncated to integer fixedbugs/issue13471.go:16:23: error: floating-point constant truncated to integer fixedbugs/issue13471.go:18:26: error: floating-point constant truncated to integer fixedbugs/issue13471.go:19:26: error: floating-point constant truncated to integer fixedbugs/issue13471.go:20:26: error: floating-point constant truncated to integer fixedbugs/issue13471.go:21:25: error: floating-point constant truncated to integer fixedbugs/issue13471.go:22:24: error: floating-point constant truncated to integer fixedbugs/issue13471.go:24:24: error: floating-point constant truncated to integer fixedbugs/issue13821b.go:18:12: error: incompatible types in binary expression fixedbugs/issue13821b.go:19:13: error: incompatible types in binary expression fixedbugs/issue13821b.go:20:13: error: incompatible types in binary expression fixedbugs/issue13821b.go:21:13: error: incompatible types in binary expression fixedbugs/issue13821b.go:22:13: error: incompatible types in binary expression fixedbugs/issue13821b.go:24:12: error: incompatible types in binary expression fixedbugs/issue14006.go:24:18: error: expected ‘;’ or ‘}’ or newline fixedbugs/issue14006.go:30:18: error: expected ‘;’ or ‘}’ or newline fixedbugs/issue14006.go:37:22: error: expected ‘;’ or ‘}’ or newline fixedbugs/issue14006.go:43:22: error: expected ‘;’ or ‘}’ or newline fixedbugs/issue14006.go:59:17: note: previous definition of ‘labelname’ was here fixedbugs/issue14006.go:64:17: error: label ‘labelname’ already defined fixedbugs/issue14006.go:24:17: error: value computed is not used fixedbugs/issue14006.go:30:17: error: value computed is not used fixedbugs/issue14006.go:37:20: error: value computed is not used fixedbugs/issue14006.go:43:20: error: value computed is not used fixedbugs/issue14006.go:59:17: error: label ‘labelname’ defined and not used fixedbugs/issue14010.go:13:14: error: invalid left hand side of assignment fixedbugs/issue14010.go:14:14: error: invalid left hand side of assignment fixedbugs/issue14010.go:14:9: error: invalid use of type fixedbugs/issue14321.go:30:10: error: method ‘F’ is ambiguous in type ‘C’ fixedbugs/issue14321.go:31:10: error: ‘G’ is ambiguous via ‘A’ and ‘B’ fixedbugs/issue14321.go:33:10: error: type ‘C’ has no method ‘I’ fixedbugs/issue8183.go:12:14: error: integer constant overflow fixedbugs/issue9036.go:21:12: error: invalid prefix for floating constant fixedbugs/issue9036.go:22:12: error: invalid prefix for floating constant fixedbugs/issue9076.go:14:5: error: incompatible type in initialization (cannot use type uintptr as type int32) fixedbugs/issue9076.go:15:5: error: incompatible type in initialization (cannot use type uintptr as type int32) For issue9083.go avoid an error about a variable that is set but not used. fixedbugs/issue9370.go:105:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:106:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:107:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:108:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:109:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:110:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:112:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:113:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:114:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:115:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:116:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:117:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:119:13: error: cannot use ‘_’ as value fixedbugs/issue9370.go:119:18: error: cannot use ‘_’ as value fixedbugs/issue9370.go:36:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:39:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:43:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:46:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:50:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:53:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:56:15: error: incompatible types in binary expression fixedbugs/issue9370.go:57:15: error: incompatible types in binary expression fixedbugs/issue9370.go:58:15: error: incompatible types in binary expression fixedbugs/issue9370.go:59:15: error: incompatible types in binary expression fixedbugs/issue9370.go:60:15: error: incompatible types in binary expression fixedbugs/issue9370.go:61:15: error: incompatible types in binary expression fixedbugs/issue9370.go:65:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:68:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:70:15: error: incompatible types in binary expression fixedbugs/issue9370.go:71:15: error: incompatible types in binary expression fixedbugs/issue9370.go:72:15: error: incompatible types in binary expression fixedbugs/issue9370.go:73:15: error: incompatible types in binary expression fixedbugs/issue9370.go:74:15: error: incompatible types in binary expression fixedbugs/issue9370.go:75:15: error: incompatible types in binary expression fixedbugs/issue9370.go:77:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:78:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:79:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:80:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:81:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:82:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:84:15: error: incompatible types in binary expression fixedbugs/issue9370.go:85:15: error: incompatible types in binary expression fixedbugs/issue9370.go:86:15: error: incompatible types in binary expression fixedbugs/issue9370.go:87:15: error: incompatible types in binary expression fixedbugs/issue9370.go:88:15: error: incompatible types in binary expression fixedbugs/issue9370.go:89:15: error: incompatible types in binary expression fixedbugs/issue9370.go:91:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:92:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:93:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:94:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:95:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:96:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:98:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:99:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go💯15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:101:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:102:15: error: invalid operation (func can only be compared to nil) fixedbugs/issue9370.go:103:15: error: invalid comparison of non-ordered type fixedbugs/issue9370.go:121:15: error: incompatible types in binary expression fixedbugs/issue9370.go:122:15: error: incompatible types in binary expression fixedbugs/issue9370.go:123:15: error: incompatible types in binary expression fixedbugs/issue9370.go:124:15: error: incompatible types in binary expression Change-Id: I4089de4919112b08f5f2bbec20f84fcc7dbe3955 Reviewed-on: https://go-review.googlesource.com/c/go/+/276832 Trust: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> |
||
Robert Griesemer
|
ddf44904f1 |
[dev.typeparams] test: exclude 32bit-specific test that fails on 32bit platforms (fix build)
Change-Id: I4f1d5d34dd9b26cea8e837a8ff7e833e02c913e1 Reviewed-on: https://go-review.googlesource.com/c/go/+/276815 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Robert Findley <rfindley@google.com> |