------- Additional Comments From schwab at suse dot de 2005-02-12 15:32 ------- I don't see any contradiction between const and weak. Neither does __pthread_internal_tsd_address read memory (it returns a pointer to some, but the address is an invariant). Once you know that the function is non-null you can freely hoist the call out of the loop.
-- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19917