aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/go.test
AgeCommit message (Collapse)AuthorFilesLines
2023-01-16Update copyright years.Jakub Jelinek1-1/+1
2022-07-05compiler: better error message for unknown package nameIan Lance Taylor1-3/+3
Fixes golang/go#51237 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/415994
2022-04-13go.test: update issue10441.go to current upstream versionIan Lance Taylor1-1/+1
This test only needs to be compiled, not linked.
2022-03-29LoongArch Port: gcc/testsuitechenglulu1-0/+3
2022-03-29 Chenghua Xu <xuchenghua@loongson.cn> Lulu Cheng <chenglulu@loongson.cn> gcc/testsuite/ChangeLog: * g++.dg/cpp0x/constexpr-rom.C: Add build options for LoongArch. * g++.old-deja/g++.abi/ptrmem.C: Add LoongArch support. * g++.old-deja/g++.pt/ptrmem6.C: xfail for LoongArch. * gcc.dg/20020312-2.c: Add LoongArch support. * c-c++-common/zero-scratch-regs-10.c: Like wise * c-c++-common/zero-scratch-regs-11.c: Like wise * c-c++-common/zero-scratch-regs-8.c: Like wise * c-c++-common/zero-scratch-regs-9.c: Like wise * gcc.dg/loop-8.c: Skip on LoongArch. * gcc.dg/torture/stackalign/builtin-apply-2.c: Likewise. * gcc.dg/tree-ssa/ssa-fre-3.c: Likewise. * go.test/go-test.exp: Define the LoongArch target. * lib/target-supports.exp: Like wise. * gcc.target/loongarch/loongarch.exp: New file. * gcc.target/loongarch/tst-asm-const.c: Like wise. * gcc.target/loongarch/larch-builtin.c: Like wise.
2022-02-04compiler: accept "any" as an alias for "interface{}"Ian Lance Taylor1-2/+3
For golang/go#33232 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/382248
2022-01-03Update copyright years.Jakub Jelinek1-1/+1
2021-08-02compiler, runtime: allow slice to array pointer conversionIan Lance Taylor1-0/+86
Panic if the slice is too short. For golang/go#395 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/338630
2021-08-02compiler, runtime: support unsafe.Add and unsafe.SliceIan Lance Taylor1-0/+64
For golang/go#19367 For golang/go#40481 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/338949
2021-04-02Skip couple of Go tests on 32-bit SPARCEric Botcazou2-2/+2
Since they are already skipped on other 32-bit architectures. gcc/testsuite/ * go.test/test/fixedbugs/issue6036.go: Skip on sparc. * go.test/test/fixedbugs/issue22200b.go: Likewise.
2021-01-07test: add new Go tests from source repoIan Lance Taylor3-0/+33
2021-01-04Update copyright years.Jakub Jelinek1-1/+1
2020-12-18compiler: check for floating-point exponent overflowIan Lance Taylor2-11/+15
Adjust mksysinfo and mkrsysinfo to strip out floating-point max numbers, as they can trigger this error. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/278476
2020-12-17Go testsuite: handle +build lines correctlyIan Lance Taylor18-73/+119
Update the Go testsuite driver to handle +build lines as is done in the upstream repo, and update some tests to the upstream repo copy using +build lines with "gc" and "!gccgo" as appropriate. * go.test/go-test.exp (go-set-goos): New procedure. (go-gc-match): New procedure. (go-gc-tests): Call go-set-goos. Use go-gc-match to handle +build lines. Look for +build lines beyond first line of file.
2020-12-16test: add new Go tests from source repoIan Lance Taylor505-0/+13602
2020-12-16test: add new Go tests from source repoIan Lance Taylor274-0/+7480
2020-12-16test: add new Go tests from source repoIan Lance Taylor14-0/+579
2020-12-15Go testsuite: update bugs for recent changeIan Lance Taylor2-2/+2
This matches changes in 788d204885c187d5604e3960d7c78e1523f04861.
2020-12-14go-test.exp: retain any characters at end of ERROR lineIan Lance Taylor1-2/+1
* go.test/go-test.exp (errchk): Retain any characters at the end of the comment.
2020-12-09go-test.exp: recognize errorcheckdir -nIan Lance Taylor1-1/+1
* go.test/go-test.exp (go-gc-tests): Recognize errorcheckdir -n, for bug345.go.
2020-12-09go-test.exp: rewrite errchk regexp quotingIan Lance Taylor1-40/+22
* go.test/go-test.exp (errchk): Rewrite regexp quoting to use curly braces, making it much simpler.
2020-12-07go-test.exp: don't quote already-quoted parenthesesIan Lance Taylor1-2/+2
* go.test/go-test.exp (errchk): Don't backslash quote parentheses that are already backslash quoted.
2020-12-03Go testsuite: update new tests to version in source repoIan Lance Taylor23-59/+50
2020-12-03Go testsuite: add a bunch of new tests from source repoIan Lance Taylor112-0/+3339
2020-12-03go-test.exp: add -I. when compiling in directoryIan Lance Taylor1-5/+5
* go.test/go-test.exp (go-gc-tests): Add -I. when building all sources in a directory (errorcheckdir, compiledir, rundir, rundircmpout).
2020-12-03testsuite: update existing Go tests to source repoIan Lance Taylor582-10318/+4741
This updates a bunch of existing Go tests to the contents of the source repo. This does not add any of the newer tests.
2020-12-03compiler: defer to middle-end for complex divisionIan Lance Taylor3-2455/+4170
Go used to use slightly different semantics than C99 for complex division, so we used runtime routines to handle the different. The gc compiler has changes its behavior to match C99, so changes ours as well. For golang/go#14644 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/274213
2020-12-02Go testsuite: update semi6.go from source repoIan Lance Taylor1-5/+3
This should have been part of c7932d5626a81a35686a3992b5a02570aba5cd0b, but I forgot.
2020-12-02compiler: reword "declared and not used" error messageIan Lance Taylor2-15/+5
This is a gofrontend copy of https://golang.org/cl/203282. From the CL 203282 description: "declared and not used" is technically correct, but might confuse the user. Switching "and" to "but" will hopefully create the contrast for the users: they did one thing (declaration), but not the other --- actually using the variable. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273629
2020-12-02compiler: improve mixed named/unnamed parameter error messageIan Lance Taylor1-3/+3
Use the same error as the current gc compiler. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273628
2020-12-01go-test.exp: permit trailing */ on ERROR lineIan Lance Taylor1-1/+1
* go.test/go-test.exp (errchk): Permit trailing */ on ERROR line.
2020-11-30compiler: improve error messages for expected curly braceIan Lance Taylor3-8/+6
For golang/go#17328 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273890
2020-11-30compiler: always use int context for index valuesIan Lance Taylor1-6/+12
For golang/go#14844 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273889
2020-11-30compiler: better error messages for missing interface methodIan Lance Taylor1-2/+2
For golang/go#10700 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273886
2020-11-30compiler: improve error for import of non-stringIan Lance Taylor1-32/+4
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273867
2020-11-28compiler: avoid follow-on errors for bad typesIan Lance Taylor1-8/+13
Mark bad types as erroneous, to avoid generating further errors. This required some code using array types to check for errors. For https://golang.org/issue/19880 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/273626
2020-09-22go.test: update issue4458.go for recent changeIan Lance Taylor1-1/+1
2020-06-12go.test: update issue4085b.go to version from Go 1.13Ian Lance Taylor1-1/+3
This lets the test pass on AIX. Not updating to master because we get slightly different error messages, so that is a more complex change.
2020-01-10compiler: permit duplicate methods from embedded interfacesIan Lance Taylor2-17/+3
This is a language change for Go 1.14. Updates golang/go#6977 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214240 From-SVN: r280109
2020-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r279813
2019-09-06libgo: update to Go 1.13beta1 releaseIan Lance Taylor1-0/+1
Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/193497 From-SVN: r275473
2019-08-20compiler, runtime: implement shifts by signed amountsIan Lance Taylor1-5/+5
Shifting by signed types is a new language feature in Go 1.13. This requires a patch to the testsuite. Updates golang/go#19113 Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/190977 * go.test/test/fixedbugs/bug073.go: Update for language changes. From-SVN: r274755
2019-06-23compiler: edit error messages to avoid -Wformat-diag warningsIan Lance Taylor1-3/+3
GCC recently introduced -Wformat-diag to scrutinize GCC error messages. It reports a number of warnings about gofrontend code, such as: ../../trunk/gcc/go/gofrontend/import.cc: In member function ‘Type* Import::type_for_index(int, const string&, size_t, bool*)’: ../../trunk/gcc/go/gofrontend/import.cc:1129:48: warning: unquoted operator ‘>=’ in format [-Wformat-diag] 1129 | "error in %s at %lu: bad type index %d >= %d", | ^~ ../../trunk/gcc/go/gofrontend/ast-dump.cc: In member function ‘void Ast_dump_context::dump(Gogo*, const char*)’: ../../trunk/gcc/go/gofrontend/ast-dump.cc:203:25: warning: unquoted option name ‘-fgo-dump-ast’ in format [-Wformat-diag] 203 | "cannot open %s:%m, -fgo-dump-ast ignored", dumpname.c_str()); | ^~~~~~~~~~~~~ ../../trunk/gcc/go/gofrontend/expressions.cc: In static member function ‘static Bexpression* Func_expression::get_code_pointer(Gogo*, Named_object*, Location)’: ../../trunk/gcc/go/gofrontend/expressions.cc:1350:29: warning: misspelled term ‘builtin function’ in format; use ‘built-in function’ instead [-Wformat-diag] 1350 | "invalid use of special builtin function %qs; must be called", | ^~~~~~~~~~~~~~~~ ../../trunk/gcc/go/gofrontend/gogo.cc: In member function ‘void Gogo::add_linkname(const string&, bool, const string&, Location)’: ../../trunk/gcc/go/gofrontend/gogo.cc:2527:4: warning: unquoted sequence of 2 consecutive punctuation characters ‘//’ in format [-Wformat-diag] 2527 | ("%s is not a function; " | ~^~~~~~~~~~~~~~~~~~~~~~~~ 2528 | "//go:linkname is only supported for functions"), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This CL edits error messages to avoid these warnings. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/183497 * go.test/test/blank1.go: Update for diagnostic message changes. From-SVN: r272608
2019-05-16compiler: improve escape analysis on interface conversionsCherry Zhang1-1/+4
If an interface does not escape, it doesn't need a heap allocation to hold the data (for non-direct interface type). This CL improves the escape analysis to track interface conversions, and reduces these allocations. Implicit interface conversions were mostly added late in the compilation pipeline, after the escape analysis. For the escape analysis to see them, we move the introduction of these conversions earlier, right before the escape analysis. Now that the compiler can generate interface conversions inlined, gcc/testsuite/go.test/test/nilptr2.go needs to be adjusted as in golang.org/cl/176579, so the use function does an actual use. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/176459 * go.test/test/nilptr2.go: Change use function to actually do something. From-SVN: r271276
2019-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r267494
2018-10-03* go.test/go-test.exp (go-set-goarch): Use amd64p32 on x32.Ian Lance Taylor1-0/+2
From-SVN: r264825
2018-09-24libgo: update to Go 1.11Ian Lance Taylor2-17/+30
Reviewed-on: https://go-review.googlesource.com/136435 gotools/: * Makefile.am (mostlyclean-local): Run chmod on check-go-dir to make sure it is writable. (check-go-tools): Likewise. (check-vet): Copy internal/objabi to check-vet-dir. * Makefile.in: Rebuild. From-SVN: r264546
2018-02-22re PR go/84484 (libgo configure tests fail to find -latomic)Andreas Schwab1-0/+3
PR go/84484 libgo: add support for riscv64 Patch by Andreas Schwab. Reviewed-on: https://go-review.googlesource.com/96377 * go.test/go-test.exp (go-set-goarch): Recognize riscv64-*-*. From-SVN: r257914
2018-01-03Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r256169
2017-09-14libgo: update to go1.9Ian Lance Taylor1-13/+2
Reviewed-on: https://go-review.googlesource.com/63753 From-SVN: r252767
2017-06-23go-test.exp (go-set-goarch): Update MIPS architecture names.James Cowgill1-9/+7
* go.test/go-test.exp (go-set-goarch): Update MIPS architecture names. From-SVN: r249589