Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestRaceDivConst (0.13 sec)

  1. src/runtime/race/testdata/mop_test.go

    	var x, y, z int
    	_ = x
    	ch := make(chan int, 2)
    
    	go func() {
    		x = y / (z + 1)
    		ch <- 1
    	}()
    	go func() {
    		y = z
    		ch <- 1
    	}()
    	<-ch
    	<-ch
    }
    
    func TestRaceDivConst(t *testing.T) {
    	var x, y, z uint32
    	_ = x
    	ch := make(chan int, 2)
    
    	go func() {
    		x = y / 3 // involves only a HMUL node
    		ch <- 1
    	}()
    	go func() {
    		y = z
    		ch <- 1
    	}()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 23 16:46:25 UTC 2023
    - 28.9K bytes
    - Viewed (0)
Back to top