1// { dg-do compile } 2// { dg-options "-fgo-debug-optimization" } 3 4package p 5 6func F(x []byte, y string) bool { 7 return string(x) == y // { dg-error "no copy string\\(\\\[\\\]byte\\)" } 8} 9 10func BytesEqual(x, y []byte) bool { 11 return string(x) == // { dg-error "no copy string\\(\\\[\\\]byte\\)" } 12 string(y) // { dg-error "no copy string\\(\\\[\\\]byte\\)" } 13} 14