https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64922
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P3 |P1 Status|UNCONFIRMED |NEW Last reconfirmed| |2015-02-03 CC| |hubicka at gcc dot gnu.org Target Milestone|--- |5.0 Ever confirmed|0 |1 --- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Goes away with -fno-devirtualize or -fno-devirtualize-speculatively. Looking at the dumps, after IPA we have: [pol6.C:39:3] Head::parse (_33, _30); call (looks fine), but instead of the 3 expected [pol6.C:39:3] Code_Block::parse (_36, _30); [pol6.C:39:3] Code_Block::parse (_36, _30); [pol6.C:39:3] Code_Block::parse (_36, _30); calls that show e.g. with -fno-devirtualize-speculatively we instead have: [pol6.C:39:3] __builtin_unreachable (_36, _30); [pol6.C:39:3] __builtin_unreachable (_36, _30); [pol6.C:39:3] __builtin_unreachable (_36, _30); and no wonder everything goes wrong afterwards. I don't see why IPA devirtualization thinks something is wrong on the Code_Block::parse calls. And, because for these __builtin_unreachable calls IPA doesn't strip the undesirable arguments, it isn't transformed even with -fsanitize=undefined into __ubsan_handle_unreachable (), which would make it far easier to figure this out. Honza, can you please have a look?