-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Milestone
Description
What does 'go version' print? go version go1.3.3 linux/amd64 What steps reproduce the problem? If possible, include a link to a program on play.golang.org. 1. Get http://play.golang.org/p/mQAu2o6wEb. 2. Uncomment the Println before the if. 3. Run. What happened? When compiled as usual, this prints "Not Equals". But when compiled with -gcflags '-N' it prints "Equals". What should have happened instead? It should have printed "Equals" in both cases, as it does when fmt.Println(a) is commented, or if b is printed as well. Please provide any additional information below. The behaviour is the same on Go 1.2. The tip version (go version devel +fb3d6c1631c3 Wed Oct 15 14:33:52 2014 -0400 linux/amd64) prints "Not Equals" both with optimisations and without them.