On 2012-08-10 14:55, Dehao Chen wrote: > I see your point. But the problem is that the above code is in > gimplify_call_expr, in which we have no idea if it is in a > TRY_FINALLY/TRY_CATCH block.
That's why I suggested saving and restoring input_location while gimplifying try_finally. i.e. location_t save_loc = input_location; input_location = UNKNOWN_LOCATION; gimplify_and_add (TREE_OPERAND (*expr_p, 1), &cleanup); input_location = save_loc; You may not even need the save_loc, since gimplify_expr already has an outer saved_location. r~