Source file test/fixedbugs/issue28616.go

     1  // compile
     2  
     3  // Copyright 2018 The Go Authors. All rights reserved.
     4  // Use of this source code is governed by a BSD-style
     5  // license that can be found in the LICENSE file.
     6  
     7  // Make sure we don't dead code eliminate a label.
     8  
     9  package p
    10  
    11  var i int
    12  
    13  func f() {
    14  
    15  	if true {
    16  
    17  		if i == 1 {
    18  			goto label
    19  		}
    20  
    21  		return
    22  	}
    23  
    24  label:
    25  }
    26  

View as plain text