cmd/gc: implement new return requirements
Fixes #65.
R=ken2
CC=golang-dev
https://golang.org/cl/7441049
diff --git a/test/fixedbugs/bug086.go b/test/fixedbugs/bug086.go
index fc69e0e..f03982b 100644
--- a/test/fixedbugs/bug086.go
+++ b/test/fixedbugs/bug086.go
@@ -6,12 +6,12 @@
package main
-func f() int { // ERROR "return|control"
+func f() int { // GCCGO_ERROR "control"
if false {
return 0;
}
// we should not be able to return successfully w/o a return statement
-}
+} // GC_ERROR "return"
func main() {
print(f(), "\n");
diff --git a/test/fixedbugs/issue4663.go b/test/fixedbugs/issue4663.go
index b3d6602..edaee93 100644
--- a/test/fixedbugs/issue4663.go
+++ b/test/fixedbugs/issue4663.go
@@ -11,4 +11,5 @@
func a(b int) int64 {
b // ERROR "not used"
+ return 0
}