diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-12-12 18:45:24 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2013-12-12 18:45:24 +0000 |
commit | 10d91e57986941516dc7c0d1c6ec0915d68f614e (patch) | |
tree | f43417def1385528bc3c3f1f6c36c5b991642fb9 /gcc/testsuite/go.test/test | |
parent | f7685b6677db3979392d7a063d4660b84c461c42 (diff) | |
download | gcc-10d91e57986941516dc7c0d1c6ec0915d68f614e.zip gcc-10d91e57986941516dc7c0d1c6ec0915d68f614e.tar.gz gcc-10d91e57986941516dc7c0d1c6ec0915d68f614e.tar.bz2 |
compiler: Don't compare structs with blank non-comparable fields.
From-SVN: r205937
Diffstat (limited to 'gcc/testsuite/go.test/test')
-rw-r--r-- | gcc/testsuite/go.test/test/cmp.go | 6 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/cmp6.go | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gcc/testsuite/go.test/test/cmp.go b/gcc/testsuite/go.test/test/cmp.go index 5be6456..73de502 100644 --- a/gcc/testsuite/go.test/test/cmp.go +++ b/gcc/testsuite/go.test/test/cmp.go @@ -43,8 +43,8 @@ func main() { var d string = "hel" // try to get different pointer d = d + "lo" - // exp/ssa/interp can't handle unsafe.Pointer. - if os.Getenv("GOSSAINTERP") != "" { + // go.tools/ssa/interp can't handle unsafe.Pointer. + if os.Getenv("GOSSAINTERP") == "" { if stringptr(c) == stringptr(d) { panic("compiler too smart -- got same string") } @@ -296,7 +296,7 @@ func main() { { var x = struct { x int - _ []int + _ string y float64 _ float64 z int diff --git a/gcc/testsuite/go.test/test/cmp6.go b/gcc/testsuite/go.test/test/cmp6.go index 7d99aae..839c274 100644 --- a/gcc/testsuite/go.test/test/cmp6.go +++ b/gcc/testsuite/go.test/test/cmp6.go @@ -53,7 +53,7 @@ func main() { // Comparison of structs should have a good message use(t3 == t3) // ERROR "struct|expected" - use(t4 == t4) // ok; the []int is a blank field + use(t4 == t4) // ERROR "cannot be compared|non-comparable" // Slices, functions, and maps too. var x []int |