On Mon, Jul 9, 2012 at 3:23 PM, <asha...@chromium.org> wrote: > I also filed a bug here: > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53547
Why are you compiling from a different source code base with profile-use than with profile-generate? I'm surprised this works at all, I would have expected GCC to just bail out. The patch at the codereview link doesn't work for me, it gives errors about broken chunks. Some general comments on the patch: You should make your patch GCC code style conforming. That means "DECL_READ_PROFILE_P (blah)" i.e. with the space. You should also add a comment in ipa-inline.c why the extra DECL_READ_PROFILE_P tests are needed there. It's not immediately obvious to me that it's even reasonable to expect things to work if !DECL_READ_PROFILE_P. I think a warning, conditional on OPT_Winline or OPT_Wdisabled_optimization, is also necessary for this kind of work-arounds. I would make this DECL_READ_PROFILE_P a static inline function in profile.h. I don't think you should ever have a NULL DECL_STRUCT_FUNCTION. Can you try with a gcc_assert in place for that, or eliminate DECL_READ_PROFILE_P altogether and just use profile_status_for_function directly? But first of all, I think you should explain why you're changing the source code between profile-generate and profile-use. Ciao! Steven