• Robert Griesemer's avatar
    cmd/internal/gc: avoid spurious div-zero errors · 99475dfb
    Robert Griesemer authored
    Set overflowing integer constants to 1 rather than 0 to avoid
    spurious div-zero errors in subsequent constant expressions.
    
    Also: Exclude new test case from go/types test since it's
    running too long (go/types doesn't have an upper constant
    size limit at the moment).
    
    Fixes #7746.
    
    Change-Id: I3768488ad9909a3cf995247b81ee78a8eb5a1e41
    Reviewed-on: https://go-review.googlesource.com/9165
    Run-TryBot: Robert Griesemer <gri@golang.org>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarRuss Cox <rsc@golang.org>
    99475dfb
mparith2.go 5.11 KB