aboutsummaryrefslogtreecommitdiff
path: root/gcc/go
AgeCommit message (Collapse)Author
2019-11-19Merge branches/gcc-7-branch rev 278197.linaro/gcc-7-branchMaxim Kuvyrkov
Change-Id: Ibb71a61e711bfb73fb19339d3f402c53d9dfa681
2018-12-13Merge branches/gcc-7-branch rev 267072.Maxim Kuvyrkov
Change-Id: I83ceab6336401e9ffe788b948ba29c3fdadea973
2018-11-09Merge branches/gcc-7-branch rev 265943.Maxim Kuvyrkov
Change-Id: I26d1099385c6c64150e153f8f6f304d161b5dac1
2018-03-08Merge branches/gcc-7-branch rev 258315 .Maxim Kuvyrkov
Change-Id: I651281d13f040cd2f9f911c460a26b61fe82b136
2017-08-17Merge branches/gcc-7-branch rev 251138.Yvan Roux
Change-Id: I97fe02630ee0e0dac705ef3ef3bf76ddafd5cab8
2017-06-14Merge branches/gcc-7-branch rev 249190.Yvan Roux
Change-Id: I29353b553aba293581d8240e44db829cdc51b308
2017-05-02Update ChangeLog and version files for releasegcc-7_1_0-releasegccadmin
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@247493 138bc75d-0d04-0410-961f-82ee72b054a4
2017-03-28 PR go/80226ian
* go-gcc.cc (Gcc_backend::return_statement): Check for void_type_node when checking result size. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246553 138bc75d-0d04-0410-961f-82ee72b054a4
2017-03-22 compiler: initialize gogo fieldsian
A couple of the data members in the Gogo class were not being initialized properly. This was causing "uninitialized value" errors during Valgrind memcheck runs. This patch insures that all of the fields receive an initial value. Reviewed-on: https://go-review.googlesource.com/38470 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246407 138bc75d-0d04-0410-961f-82ee72b054a4
2017-03-22 PR go/80128ian
compiler: check backend alignment for memequalNN functions The code was assuming the usual required alignment for the memequalNN functions (16 bits for int16, 32 for int32, etc.). However, on m68k the required alignment of int32 is only 16 bits. Assuming the memequalNN alignment caused the compiler to incorrectly decide that int32 required a specially generated function rather than calling memequal32. This then crashed if the type descriptor were generated after type-specific functions had been written. Fixes GCC PR 80128. Reviewed-on: https://go-review.googlesource.com/38433 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246382 138bc75d-0d04-0410-961f-82ee72b054a4
2017-02-28 mksigtab.sh: skip signals defined as other signalsian
Fixes Solaris build. Patch by Rainer Orth. Reviewed-on: https://go-review.googlesource.com/37587 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245794 138bc75d-0d04-0410-961f-82ee72b054a4
2017-02-28 runtime: fix sigfwd to not allocate memoryian
The use of &[1]uintptr{fn} was causing sigfwd to allocate memory, even though it is being compiled for the runtime package. That is a bad idea for this function, which is invoked by a signal handler. Rewrite it to use only constructs that do not allocate memory when compiled for the runtime package. The test for this is misc/cgo/testcarchive in the main repo, which we don't yet test. Reviewed-on: https://go-review.googlesource.com/37454 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245777 138bc75d-0d04-0410-961f-82ee72b054a4
2017-02-28 libgo: fix quoting in mksigtab.shian
The quoting was causing us to never add the system-specific signals. The test for this is misc/cgo/testcarchive in the master repo, which we don't yet run for gccgo. Reviewed-on: https://go-review.googlesource.com/37453 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245776 138bc75d-0d04-0410-961f-82ee72b054a4
2017-02-21 PR go/79642ian
* lang.opt (-fgo-relative-import-path): Change space to tab. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245619 138bc75d-0d04-0410-961f-82ee72b054a4
2017-02-17 libgo: update to final Go 1.8 releaseian
Along with the update this fixes a problem that was always present but only showed up with the new reflect test. When a program used a **unsafe.Pointer and stored the value in an interface type, the generated type descriptor pointed to the GC data for *unsafe.Pointer. It did that by name, but we were not generating a variable with the right name. Reviewed-on: https://go-review.googlesource.com/37144 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245535 138bc75d-0d04-0410-961f-82ee72b054a4
2017-02-13 PR go/79443ian
libgo: fix some s390x tests Add `+build ignore` to ignore tests that rely on s390x assembly code not yet implemented for gccgo. Fixes GCC PR 79443. Reviewed-on: https://go-review.googlesource.com/36909 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245397 138bc75d-0d04-0410-961f-82ee72b054a4
2017-02-072017-02-07 Richard Biener <rguenther@suse.de>rguenth
PR tree-optimization/79256 PR middle-end/79278 * builtins.c (get_object_alignment_2): Use min_align_of_type to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN. * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional type parameter. * doc/tm.texi: Regenerate. * stor-layout.c (layout_decl): Adjust. (update_alignment_for_field): Likewise. (place_field): Likewise. (min_align_of_type): Likewise. * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust. * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise. * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise. * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise. * config/frv/frv.c (frv_adjust_field_align): Likewise. * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise. * config/i386/i386.c (x86_field_alignment): Likewise. * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise. * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p): Likewise. go/ * go-backend.c (go_field_alignment): Adjust. libobjc/ * encoding.c (objc_layout_structure_next_member): Adjust ADJUST_FIELD_ALIGN usage. Revert 2017-01-30 Richard Biener <rguenther@suse.de> PR tree-optimization/79256 * targhooks.c (default_builtin_vector_alignment_reachable): Honor BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus alignment on TYPE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@245245 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-27 compiler: let initializers hold addresses of fieldsian
The runtime.dbgvars initializer looks like var dbgvars = []dbgVar{ {"allocfreetrace", &debug.allocfreetrace}, } Because the field address was not recognized as valid for a static initializer, the variable was initialized at runtime. Normally that would be fine, but for the runtime package it meant that dbgvars was not initialized when it was read by parsedebugvars. That meant that the GODEBUG environment variable did nothing. Fixing that revealed that the static initializer checks had to be more careful about interface types, just like the existing is_constant methods. Reviewed-on: https://go-review.googlesource.com/35891 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244982 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-26 runtime: fix setting of isarchiveian
When I updated to Go 1.8, the initsig function moved from signal1_unix.go to signal_unix.go, and lost a gccgo-specific change in the move. Add it back. This would have been caught by the misc/cgo/testcarchive tests in the gc repository, but we don't run those in the gccgo repository. We should fix that, somehow. Reviewed-on: https://go-review.googlesource.com/35839 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244947 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-26 runtime: fix context used by getTracebackian
I typoed the argument passed to getcontext in getTraceback, and the error was hidden by ucontext_arg. This would have been caught by some of the runtime package tests, but we don't run most of them because they rely on `go build`, and the go tool is not available while running the libgo testsuite. We should fix the libgo testsuite, somehow, so that they run. Reviewed-on: https://go-review.googlesource.com/35837 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244946 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-25 compiler: improvements for type alias handlingian
Give an error for an attempt to define a method on an imported type. Give an error for each attempt to define a method on a builtin type. Adjust error messages to be closer to gc error messages. With these changes gccgo passes current tests on dev.typealias branch. This changes the errors printed for test/fixedbugs/issue5089.go, but the change is an improvement: Before: fixedbugs/issue5089.go:13:1: error: redefinition of ‘bufio.Buffered’: receiver name changed func (b *bufio.Reader) Buffered() int { // ERROR "non-local|redefinition" ^ fixedbugs/issue5089.go:11:13: note: previous definition of ‘bufio.Buffered’ was here import "bufio" // GCCGO_ERROR "previous" ^ Now: fixedbugs/issue5089.go:13:7: error: may not define methods on non-local type func (b *bufio.Reader) Buffered() int { // ERROR "non-local|redefinition" ^ Reviewed-on: https://go-review.googlesource.com/35642 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244889 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-23 libgo: update to go1.8rc2ian
Fix a bug in the generation of the hash value in reflect.FuncOf. The merge script missed a bunch of testdata files over the years. Copy them over. Reviewed-on: https://go-review.googlesource.com/35570 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244835 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-23 PR go/79037ian
compiler, runtime: align gc data for m68k The current GC requires that the gc data be aligned to at least a 4 byte boundary, because it uses the lower two bits of the address for flags (see LOOP and PRECISE in runtime/mgc0.c). As the gc data is stored as a [...]uintptr, that is normally always true. However, on m68k, that only guarantees 2 byte alignment. Fix it by forcing the alignment. The parfor code used by the current GC requires that the parfor data be aligned to at least an 8 byte boundary. The code in parfor.c verifies this. This is normally true, as the data uses uint64_t values, but, again, this must be enforced explicitly on m68k. Fixes GCC PR 79037. Reviewed-on: https://go-review.googlesource.com/35478 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244824 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-23 libgo: bump library version to 11ian
As usual I forgot to bump the library version when I updated the library to 1.8rc1. Reviewed-on: https://go-review.googlesource.com/35568 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244823 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-20 runtime, testing/internal/testdeps: fixes for cgoian
Some fixes that permit misc/cgo/test in the master gc repository to pass using the current gccgo. Install testing/internal/testdeps.gox; it is needed by `go test`. Export runtime.lockedOSThread to enable calling via go:linkname; it is used by misc/cgo/test. Loop on EAGAIN when creating a new thread; this is what the gc code does, and misc/cgo/test tests that it works. Reviewed-on: https://go-review.googlesource.com/35479 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244733 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-20 PR go/79146ian
math/big: fix build on s390x Don't build arith_decl_s390x.go for gccgo; it is only for assembly code that has not yet been ported to gccgo. For GCC PR 79146. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244731 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-20 PR go/79146ian
crypto/elliptic: explicitly ignore p256_s390x.go The file only works if used in conjunction with assembly code not (yet) written for gccgo. Fixes GCC PR 79146. Reviewed-on: https://go-review.googlesource.com/35477 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244679 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-18 syscall, golang_org/x/net/lif: fixes for gccgo on Solarisian
Reviewed-on: https://go-review.googlesource.com/35390 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244563 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-16 runtime: rename siginfo to _siginfo_tian
Since the name siginfo winds up in runtime.inc, this avoids a name collision on systems that define "struct siginfo" in the system header files. Reviewed-on: https://go-review.googlesource.com/35239 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244484 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-16 libgo: correct golang_org Makefile variables not used on all systemsian
Patch by Rainer Orth. Reviewed-on: https://go-review.googlesource.com/35238 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244483 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-14 compiler: implement type aliasesian
This is a start of implementing type aliases (`type T1 = T2`) in the Go frontend. This is incomplete, in that the reflection information is not updated for an embedded type alias. It is also not well tested. Finally, the change to the language has not been approved. This should be regarded as preliminary work for experimental use. Update golang/go#18130. Reviewed-on: https://go-review.googlesource.com/35120 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244460 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-14 libgo: update to Go 1.8 release candidate 1ian
Compiler changes: * Change map assignment to use mapassign and assign value directly. * Change string iteration to use decoderune, faster for ASCII strings. * Change makeslice to take int, and use makeslice64 for larger values. * Add new noverflow field to hmap struct used for maps. Unresolved problems, to be fixed later: * Commented out test in go/types/sizes_test.go that doesn't compile. * Commented out reflect.TestStructOf test for padding after zero-sized field. Reviewed-on: https://go-review.googlesource.com/35231 gotools/: Updates for Go 1.8rc1. * Makefile.am (go_cmd_go_files): Add bug.go. (s-zdefaultcc): Write defaultPkgConfig. * Makefile.in: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244456 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-11 compiler: add containing Bfunction to conditional_expressionian
Add containing Bfunction to Backend::conditional_expression method signature, since the back end might need to create a temporary when generating IR for this construct. Reviewed-on: https://go-review.googlesource.com/35056 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244330 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-11 compiler: mark generated struct/array types as incomparableian
The recent change to generate type functions for more types with identity comparisons caused us to generate some unnecessary functions, and even caused a compiler crash on Solaris due to phase ordering. Avoid this by marking all generated and uncompared struct and array types as incomparable, so that we don't try to generate type functions for them. Reviewed-on: https://go-review.googlesource.com/35110 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244327 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-10 runtime: copy more scheduler code from Go 1.7 runtimeian
I looked at a diff of proc.go between Go 1.7 and gccgo, and copied over all the easy stuff. Reviewed-on: https://go-review.googlesource.com/35090 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244291 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-10 compiler, runtime: drop size arguments to hash/equal functionsian
Drop the size arguments for the hash/equal functions stored in type descriptors. Types know what size they are. To make this work, generate hash/equal functions for types that can use an identity comparison but are not a standard size and alignment. Drop the multiplications by 33 in the generated hash code and the reflect package hash code. They are not necessary since we started passing a seed value around, as the seed includes the hash of the earlier values. Copy the algorithms for standard types from the Go 1.7 runtime, replacing the C functions. Reviewed-on: https://go-review.googlesource.com/34983 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244256 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-09 runtime: copy more of scheduler from Go 1.7 runtimeian
This started by moving procresize from C to Go so that we can pass the right type to the memory allocator when allocating a p, which forced the gomaxprocs variable to move from C to Go, and everything else followed from that. Reviewed-on: https://go-review.googlesource.com/34916 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244236 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-06 PR go/78978ian
libgo: build with -Wa,-nH if possible on Solaris By default the Solaris assembler records the required hardware capability in the object file. This means that the AES hashing code breaks on systems that do not support AES, even though the code uses a runtime check to only actually invoke the AES instructions on systems that support it. An earlier fix for the problem only fixed the shared library, not the static libgo.a. Fix the problem for real by using an assembler option to not record the hardware capability. For GCC PR 78978. Patch by Rainer Orth. Reviewed-on: https://go-review.googlesource.com/34910 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244165 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-03 runtime: remove __go_alloc and __go_freeian
Move allocg and handling of allgs slice from C to Go. Reviewed-on: https://go-review.googlesource.com/34797 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244036 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-03 PR go/78789ian
runtime: don't build aeshash.c if the assembler doesn't support it This is for CentOS 5, whose assembler does not know the aesinc instruction. Fixes GCC PR 78789. Patch by Uros Bizjak. Reviewed-on: https://go-review.googlesource.com/34796 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244031 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-01 Update copyright years.jakub
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243994 138bc75d-0d04-0410-961f-82ee72b054a4
2017-01-01gcc/jakub
* gcc.c (process_command): Update copyright notice dates. * gcov-dump.c (print_version): Ditto. * gcov.c (print_version): Ditto. * gcov-tool.c (print_version): Ditto. * gengtype.c (create_file): Ditto. * doc/cpp.texi: Bump @copying's copyright year. * doc/cppinternals.texi: Ditto. * doc/gcc.texi: Ditto. * doc/gccint.texi: Ditto. * doc/gcov.texi: Ditto. * doc/install.texi: Ditto. * doc/invoke.texi: Ditto. gcc/fortran/ * gfortranspec.c (lang_specific_driver): Update copyright notice dates. * gfc-internals.texi: Bump @copying's copyright year. * gfortran.texi: Ditto. * intrinsic.texi: Ditto. * invoke.texi: Ditto. gcc/ada/ * gnat_ugn.texi: Bump @copying's copyright year. * gnat_rm.texi: Likewise. gcc/go/ * gccgo.texi: Bump @copyrights-go year. libitm/ * libitm.texi: Bump @copying's copyright year. libgomp/ * libgomp.texi: Bump @copying's copyright year. libquadmath/ * libquadmath.texi: Bump @copying's copyright year. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243992 138bc75d-0d04-0410-961f-82ee72b054a4
2016-12-30 compile: add type conversion in Type::gc_symbol_pointerian
Wrap the return from Type::gc_symbol_pointer with a type conversion to uintptr, since the values returned are stored into structure fields with that type. Reviewed-on: https://go-review.googlesource.com/34625 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243978 138bc75d-0d04-0410-961f-82ee72b054a4
2016-12-30 compiler: use more accurate array type in Gogo::register_gc_varsian
The length of the roots array in Gogo::register_gc_vars was being computed incorrectly, potentially leading to type clashes in the back end. Compute an accurate length for this array ahead of time. Reviewed-on: https://go-review.googlesource.com/34624 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243974 138bc75d-0d04-0410-961f-82ee72b054a4
2016-12-22 compiler: fix spurious redefinition error for anon structian
Change Struct_type::do_mangled_name to incorporate the field names even for hidden symbols. This is needed in cases where a package imports a type "S" that has an anonymous struct, e.g. // imported from some other package type S struct { X struct{ _ struct{} } } and then defines a local type that uses a structurally identical anonymous struct, e.g. // defined locally type T struct { U struct{ _ struct{} } } In the case above both types triggered the creation of hash/equal methods, but the method names were clashing (since both structs had the same mangled name). Fixes golang/go#18414 Reviewed-on: https://go-review.googlesource.com/34621 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243899 138bc75d-0d04-0410-961f-82ee72b054a4
2016-12-19 runtime: copy cgo support from Go 1.7 runtimeian
Remove support for _cgo_allocate. It was removed from the gc toolchain in Go 1.5, so it is unlikely that anybody is trying to use it. Reviewed-on: https://go-review.googlesource.com/34557 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243805 138bc75d-0d04-0410-961f-82ee72b054a4
2016-12-16 compiler: add containing Bfunction to some backend interfaces.ian
Change the interfaces for backend methods that create statements to always pass in the enclosing Bfunction for the statement. Having the function available simplifies things if a temporary variable has to be created during the construction of a statement. This also includes a change to the Mark_lvalue_varexprs helper class to handle indirections on the left hand side of assignments (e.g. "*x.y = ..."). Reviewed-on: https://go-review.googlesource.com/34471 * go-gcc.cc (Gcc_backend::expression_statement): Add Bfunction* parameter. (Gcc_backend::init_statement): Likewise. (Gcc_backend::assignment_statement): Likewise. (Gcc_backend::if_statement): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243766 138bc75d-0d04-0410-961f-82ee72b054a4
2016-12-16 compiler: fix comments + fieldnames to match libgo sourceian
A couple of the comments in the type descriptor code were out of date with respect to the names in libgo/go/runtime/type.go. Fix up the comments and field names to bring them into sync. Reviewed-on: https://go-review.googlesource.com/34472 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243735 138bc75d-0d04-0410-961f-82ee72b054a4
2016-12-15 compiler: fix off-by-1 array type len in Type::gc_symbol_constructorian
Array type being built to hold GC var initializer was being created with an extra/unneeded slot. Fix up the code to insure that the array length matches the length of the initializer list. Reviewed-on: https://go-review.googlesource.com/34413 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243731 138bc75d-0d04-0410-961f-82ee72b054a4
2016-12-15 PR go/78763ian
compiler: call determine_types even for constant expressions We need to call determine_types even for constant expressions, since a constant expression may include code like unsafe.Sizeof(0). Something needs to determine the type of the untyped 0, and that should be the determine_types pass. Implementing that triggered a compiler crash on test/const1.go because it permitted some erroneous constants to make it all the way to the backend. Catch that case by checking whether we get a constant overflow error, and marking the expression invalid if we do. This is a good change in any case, as previously we reported the same constant overflow error multiple times, and now we only report it once. Fixes GCC PR 78763. Reviewed-on: https://go-review.googlesource.com/34496 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@243729 138bc75d-0d04-0410-961f-82ee72b054a4