On Thu, Dec 15, 2016 at 4:25 PM, Ian Lance Taylor <i...@golang.org> wrote: > On Thu, Dec 15, 2016 at 2:47 PM, Ian Lance Taylor <i...@golang.org> wrote: >> The Go frontend needs to call determine_types even for constant >> expressions, which it was not doing. The problem is that 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. >> >> This fixes GCC PR 78763. >> >> Bootstrapped and ran Go testsuite on x86_64-pc-linux-gnu. Committed >> to mainline. > > > In order to fix GCC PR 78763, I'd like to commit this patch to the GCC > 6 branch. I've bootstrapped the test on x86_64-pc-linux-gnu, and > verified that the Go tests continue to pass.
Now committed to GCC 6 branch. Ian