re PR target/41693 (RTL Check Failure in expand_debug_expr, at cfgexpand.c:2371)

PR target/41693
	* rtl.h (DEBUG_EXPR_TREE_DECL): Define.
	* sched-vis.c (print_value): Use it.
	* cselib.c (cselib_hash_rtx): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* cfgexpand.c (expand_debug_rtx): Likewise.
	* var-tracking.c (vt_expand_loc_callback): Likewise.

From-SVN: r152707
This commit is contained in:
Jakub Jelinek 2009-10-13 15:56:07 +02:00 committed by Jakub Jelinek
parent ab6218f150
commit e4fb38bd17
7 changed files with 20 additions and 5 deletions

View File

@ -1,3 +1,13 @@
2009-10-13 Jakub Jelinek <jakub@redhat.com>
PR target/41693
* rtl.h (DEBUG_EXPR_TREE_DECL): Define.
* sched-vis.c (print_value): Use it.
* cselib.c (cselib_hash_rtx): Likewise.
* print-rtl.c (print_rtx): Likewise.
* cfgexpand.c (expand_debug_rtx): Likewise.
* var-tracking.c (vt_expand_loc_callback): Likewise.
2009-10-13 Richard Guenther <rguenther@suse.de>
PR lto/41565

View File

@ -2368,7 +2368,7 @@ expand_debug_expr (tree exp)
return op0;
op0 = gen_rtx_DEBUG_EXPR (mode);
XTREE (op0, 0) = exp;
DEBUG_EXPR_TREE_DECL (op0) = exp;
SET_DECL_RTL (exp, op0);
return op0;

View File

@ -705,7 +705,8 @@ cselib_hash_rtx (rtx x, int create)
return e->value;
case DEBUG_EXPR:
hash += ((unsigned) DEBUG_EXPR << 7) + DEBUG_TEMP_UID (XTREE (x, 0));
hash += ((unsigned) DEBUG_EXPR << 7)
+ DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (x));
return hash ? hash : (unsigned int) DEBUG_EXPR;
case CONST_INT:

View File

@ -321,7 +321,8 @@ print_rtx (const_rtx in_rtx)
else if (i == 0 && GET_CODE (in_rtx) == DEBUG_EXPR)
{
#ifndef GENERATOR_FILE
fprintf (outfile, " D#%i", DEBUG_TEMP_UID (XTREE (in_rtx, 0)));
fprintf (outfile, " D#%i",
DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (in_rtx)));
#endif
}
break;

View File

@ -930,6 +930,9 @@ extern const char * const reg_note_name[];
#define NOTE_DURING_CALL_P(RTX) \
(RTL_FLAG_CHECK1("NOTE_VAR_LOCATION_DURING_CALL_P", (RTX), NOTE)->call)
/* DEBUG_EXPR_DECL corresponding to a DEBUG_EXPR RTX. */
#define DEBUG_EXPR_TREE_DECL(RTX) XCTREE (RTX, 0, DEBUG_EXPR)
/* Possible initialization status of a variable. When requested
by the user, this information is tracked and recorded in the DWARF
debug information, along with the variable's location. */

View File

@ -522,7 +522,7 @@ print_value (char *buf, const_rtx x, int verbose)
cur = safe_concat (buf, cur, "]");
break;
case DEBUG_EXPR:
sprintf (t, "D#%i", DEBUG_TEMP_UID (XTREE (x, 0)));
sprintf (t, "D#%i", DEBUG_TEMP_UID (DEBUG_EXPR_TREE_DECL (x)));
cur = safe_concat (buf, cur, t);
break;
default:

View File

@ -6304,7 +6304,7 @@ vt_expand_loc_callback (rtx x, bitmap regs, int max_depth, void *data)
return result;
case DEBUG_EXPR:
dv = dv_from_decl (XTREE (x, 0));
dv = dv_from_decl (DEBUG_EXPR_TREE_DECL (x));
xret = NULL;
break;