https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64817
--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Sun Feb 1 17:26:17 2015 New Revision: 220320 URL: https://gcc.gnu.org/viewcvs?rev=220320&root=gcc&view=rev Log: PR debug/64817 * cfgexpand.c (deep_ter_debug_map): New variable. (avoid_deep_ter_for_debug): New function. (expand_debug_expr): If TERed SSA_NAME is in deep_ter_debug_map, use the corresponding DEBUG_EXPR_DECL instead of trying to expand SSA_NAME's def stmt. (expand_debug_locations): When expanding debug bind of a DEBUG_EXPR_DECL to corresponding SSA_NAME, temporarily remove the DEBUG_EXPR_DECL from deep_ter_debug_map's value. (pass_expand::execute): Call avoid_deep_ter_for_debug on all debug bind stmts. Delete deep_ter_debug_map after expand_debug_location if non-NULL and clear it. * gcc.dg/pr64817-1.c: New test. * gcc.dg/pr64817-2.c: New test. Added: trunk/gcc/testsuite/gcc.dg/pr64817-1.c trunk/gcc/testsuite/gcc.dg/pr64817-2.c Modified: trunk/gcc/ChangeLog trunk/gcc/cfgexpand.c trunk/gcc/testsuite/ChangeLog