On 05/11/2015 06:38 AM, Jan Hubicka wrote:
- TYPE_METHODS (type) = chainon (TYPE_METHODS (type), fn); + TYPE_METHODS (type) = chainon (TYPE_METHODS (TYPE_MAIN_VARIANT (type)), fn); else { - DECL_CHAIN (fn) = TYPE_METHODS (type); - TYPE_METHODS (type) = fn; + DECL_CHAIN (fn) = TYPE_METHODS (TYPE_MAIN_VARIANT (type)); + TYPE_METHODS (TYPE_MAIN_VARIANT (type)) = fn;
Instead, let's set type = TYPE_MAIN_VARIANT (type) at the top of the function. OK with that change.
Jason