Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 505 for goTo (0.04 sec)

  1. 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)
  2. src/net/error_test.go

    			return err
    		}
    		nestedErr = err.Err
    		goto second
    	}
    	return fmt.Errorf("unexpected type on 1st nested level: %T", nestedErr)
    
    second:
    	if isPlatformError(nestedErr) {
    		return nil
    	}
    	switch err := nestedErr.(type) {
    	case *os.SyscallError:
    		nestedErr = err.Err
    		goto third
    	case *fs.PathError: // for Plan 9
    		nestedErr = err.Err
    		goto third
    	}
    	switch nestedErr {
    	case ErrClosed:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Sep 18 17:20:52 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. src/math/big/arith_s390x.s

    	ADD   $128, R10           // i += 16
    	SUB   $16, R3             // n -= 16
    	BGE   UU1                 // if n >= 0 goto U1
    	VLGVG $1, V0, R4          // put cf into R4
    	NEG   R4, R4              // save cf
    
    A1:
    	ADD $12, R3 // n += 16
    
    	// s/JL/JMP/ below to disable the unrolled loop
    	BLT v1 // if n < 0 goto v1
    
    U1:  // n >= 0
    	// regular loop body unrolled 4x
    	MOVD 0(R8)(R10*1), R5
    	MOVD 8(R8)(R10*1), R6
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 23:33:27 UTC 2023
    - 20.3K bytes
    - Viewed (0)
  7. 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)
  8. 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)
  9. src/runtime/select.go

    			sg = c.sendq.dequeue()
    			if sg != nil {
    				goto recv
    			}
    			if c.qcount > 0 {
    				goto bufrecv
    			}
    			if c.closed != 0 {
    				goto rclose
    			}
    		} else {
    			if raceenabled {
    				racereadpc(c.raceaddr(), casePC(casi), chansendpc)
    			}
    			if c.closed != 0 {
    				goto sclose
    			}
    			sg = c.recvq.dequeue()
    			if sg != nil {
    				goto send
    			}
    			if c.qcount < c.dataqsiz {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 13 21:36:04 UTC 2024
    - 15K 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