------- Comment #6 from rguenth at gcc dot gnu dot org 2009-09-21 13:08 ------- Switch assembly is optimized if you handle all valid cases (which you do) into if (i != 0) case B else case A -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41425