Actual bug. I guess gcc is either smart enough, or the code is not actually used.