Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 199 for goTo (0.04 sec)

  1. test/fixedbugs/bug137.go

    package main
    
    func main() {
    L1:
    L2:
    	for i := 0; i < 10; i++ {
    		print(i)
    		break L2
    	}
    
    L3:
    	;
    L4:
    	for i := 0; i < 10; i++ {
    		print(i)
    		break L4
    	}
    	goto L1
    	goto L3
    }
    
    /*
    bug137.go:9: break label is not defined: L2
    bug137.go:15: break label is not defined: L4
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 18 21:15:42 UTC 2012
    - 440 bytes
    - Viewed (0)
  2. test/fixedbugs/issue63955.go

    	if v := try(); v == 42 || v == 1337 { // the two || are to trick findIndVar
    		if n < 30 { // this aims to be the matched block
    			if shouldInc() {
    				n++
    				goto loop
    			}
    			n = N(n) // try to prevent some block joining
    			goto loop
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 07 17:37:47 UTC 2023
    - 578 bytes
    - Viewed (0)
  3. test/fixedbugs/bug005.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func main() {
    	Foo: {
    		return;
    	}
    	goto Foo;
    }
    /*
    bug5.go:4: Foo undefined
    bug5.go:4: fatal error: walktype: switch 1 unknown op GOTO l(4)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 04:48:57 UTC 2012
    - 325 bytes
    - Viewed (0)
  4. test/fixedbugs/bug344.go

    // license that can be found in the LICENSE file.
    
    package main
    
    import "fmt"
    
    func main() {
    	// invalid use of goto.
    	// do whatever you like, just don't crash.
    	i := 42
    	a := []*int{&i, &i, &i, &i}
    	x := a[0]
    	goto start  // ERROR "jumps into block"
    	z := 1
    	_ = z
    	for _, x = range a {	// GCCGO_ERROR "block"
    	start:
    		fmt.Sprint(*x)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 466 bytes
    - Viewed (0)
  5. cmd/kubeadm/app/cmd/version_test.go

    			var err error
    			if len(tc.flag) > 0 {
    				if err = cmd.Flags().Set(flagNameOutput, tc.flag); err != nil {
    					goto error
    				}
    			}
    			buf.Reset()
    			if err = RunVersion(&buf, cmd); err != nil {
    				goto error
    			}
    			if buf.String() == "" {
    				err = errors.New("empty output")
    				goto error
    			}
    			if tc.shouldBeValidYAML {
    				err = yaml.Unmarshal(buf.Bytes(), &iface)
    			} else if tc.shouldBeValidJSON {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Aug 17 14:40:46 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  6. test/fixedbugs/bug076.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func f() {
    exit:
    	;
    	goto exit
    }
    
    
    func main() {
    exit:
    	; // this should be legal (labels not properly scoped?)
    	goto exit
    }
    
    /*
    uetli:~/Source/go/test/bugs gri$ 6g bug076.go 
    bug076.go:11: label redeclared: exit
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 04:49:30 UTC 2012
    - 400 bytes
    - Viewed (0)
  7. test/fixedbugs/bug140.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    func main() {
    	if true {
    	} else {
    	L1:
    		goto L1
    	}
    	if true {
    	} else {
    		goto L2
    	L2:
    		main()
    	}
    }
    
    /*
    These should be legal according to the spec.
    bug140.go:6: syntax error near L1
    bug140.go:7: syntax error near L2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 18 21:15:42 UTC 2012
    - 409 bytes
    - Viewed (0)
  8. test/fixedbugs/bug178.go

    func main() {
    L:
    	for i := 0; i < 1; i++ {
    	L1:
    		for {
    			break L
    		}
    		panic("BUG: not reached - break")
    		if false {
    			goto L1
    		}
    	}
    
    L2:
    	for i := 0; i < 1; i++ {
    	L3:
    		for {
    			continue L2
    		}
    		panic("BUG: not reached - continue")
    		if false {
    			goto L3
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 04:49:30 UTC 2012
    - 455 bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/branchelim_test.go

    					Valu("const3", OpConst32, intType, 3, nil),
    					Goto("b5")),
    				Bloc("b2",
    					Valu("addr", OpAddr, boolType.PtrTo(), 0, nil, "sb"),
    					Valu("cond", OpLoad, boolType, 0, nil, "addr", "start"),
    					Valu("phi", OpPhi, intType, 0, nil, "const2", "const3"),
    					If("cond", "b3", "b4")),
    				Bloc("b3",
    					Goto("b2")),
    				Bloc("b4",
    					Goto("b2")),
    				Bloc("b5",
    					Exit("start")))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 24 15:51:15 UTC 2018
    - 5.2K bytes
    - Viewed (0)
  10. test/fixedbugs/issue10958.go

    		someglobal1++
    	}
    }
    
    func standinacorner2(i int) {
    	// contains an irreducible loop containing changes to memory
    	if i != 0 {
    		goto midloop
    	}
    
    loop:
    	if someglobal2&1 != 0 {
    		goto done
    	}
    	someglobal2++
    midloop:
    	someglobal2++
    	goto loop
    
    done:
    	return
    }
    
    func standinacorner3() {
    	for someglobal3&1 == 0 {
    		if someglobal3&2 != 0 {
    			for someglobal3&3 == 2 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:25 UTC 2023
    - 1.9K bytes
    - Viewed (0)
Back to top