http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59326
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #4) > But then it won't handle the !node->definition cloning (it isn't actually > cloning in that case, just creating another DECL_EXTERNAL FUNCTION_DECL with > adjusted arguments). So it really needs to be FOR_EACH_FUNCTION, but > perhaps can avoid the cgraph_function_with_gimple_body_p/cgraph_get_body > stuff if !node->definition. Plus the DECL_ATTRIBUTES are there even without cgraph_get_body, right? If yes, then the two new functions should go into expand_simd_clones after we see whether we want to clone it at all, so perhaps best into simd_clone_create 's node->definition case right before cgraph_function_versioning.