I'm not sure if it really belongs here, but I hope it won't hurt.. I am working on kind-of interpreter, which consists of series of indirect branches: label1: ... goto *ip; ... labelN: ... goto *ip; After optimization it is translated to more-or-less assembly equivalent of: label0: goto *ip; label1: ... goto label0; ... labelN: ... goto label0; That layout is hurting branch prediction, so I tried to disable it with -fno-crossjumping, which I believe is responsible for this optimization. For small code [tens of cases] it worked, but for larger one [hundreds] the compiler still performed that optimization. For comparison I ran GCC 3.3 with: --param max-crossjump-edges=400 -fno-crossjumping and it worked as expected. [with default values it didn't link indirect branches in the larger case anyway]
Not a bug, see PR8092. *** This bug has been marked as a duplicate of 8092 ***