]> Cypherpunks.ru repositories - gostls13.git/commitdiff
test: fix return.go to remove unused labels
authorIan Lance Taylor <iant@golang.org>
Wed, 7 Aug 2013 18:19:07 +0000 (11:19 -0700)
committerIan Lance Taylor <iant@golang.org>
Wed, 7 Aug 2013 18:19:07 +0000 (11:19 -0700)
The gc compiler only gives an error about an unused label if
it has not given any errors in an earlier pass.  Remove all
unused labels in this test because they don't test anything
useful and they cause gccgo to give unexpected errors.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/12580044

test/return.go

index 6e02b782d42f88c577cd9d77cc2c5af8aa7c9096..c1fe843827db90191c1f7a2819a9f2fb4a29d18a 100644 (file)
@@ -272,7 +272,6 @@ func _() int {
 } // ERROR "missing return"
 
 func _() int {
-L:
        print(1)
        if x == nil {
                panic(2)
@@ -972,7 +971,6 @@ func _() int {
 } // ERROR "missing return"
 
 func _() int {
-L:
        if x == nil {
                panic(2)
        } else if x == 1 {
@@ -1666,7 +1664,6 @@ var _ = func() int {
 } // ERROR "missing return"
 
 var _ = func() int {
-L:
        print(1)
        if x == nil {
                panic(2)
@@ -2366,7 +2363,6 @@ var _ = func() int {
 } // ERROR "missing return"
 
 var _ = func() int {
-L:
        if x == nil {
                panic(2)
        } else if x == 1 {