Re: PR 23296: Strange -O3 -finstrument-functions behaviour

2009-06-29 Thread Ian Lance Taylor
Richard Sandiford writes: > Is this really the intended behaviour? Andrew closed the bug as invalid, > saying that this is what we expect, but the docs seem to suggest that we > ought to do something like: > > ... > __cyg_profile_func_enter (&main, ...); > ... > __cyg_profile_fun

PR 23296: Strange -O3 -finstrument-functions behaviour

2009-06-29 Thread Richard Sandiford
A colleague recently came across the interaction between -finstrument-functions and inline functions mentioned here: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23296 As the bug submitter says, the problem is that for something like: #include void g (void) { printf("Here\n"); }