On Wed, Apr 25, 2012 at 11:57:09AM +0200, Richard Guenther wrote: > void *foo () > { > return __builtin_return_address (0); > } > > void *bar (_Bool b) > { > if (b) > return foo (); > else > return foo (); > } > > int main() > { > if (bar(true) == bar(false)) > abort (); > } > > ok ... outside of the scope of standard "C", but we certainly _can_ do this. > Which would question tail-merging the above at all, of course.
I don't think we guarantee the above, after all, even pure functions may use __builtin_return_address (0) - it doesn't modify memory, and we happily remove pure calls, CSE the return values etc. Jakub