Commit e4fb38bd by Jakub Jelinek Committed by Jakub Jelinek

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
parent ab6218f1
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> 2009-10-13 Richard Guenther <rguenther@suse.de>
PR lto/41565 PR lto/41565
...@@ -2368,7 +2368,7 @@ expand_debug_expr (tree exp) ...@@ -2368,7 +2368,7 @@ expand_debug_expr (tree exp)
return op0; return op0;
op0 = gen_rtx_DEBUG_EXPR (mode); op0 = gen_rtx_DEBUG_EXPR (mode);
XTREE (op0, 0) = exp; DEBUG_EXPR_TREE_DECL (op0) = exp;
SET_DECL_RTL (exp, op0); SET_DECL_RTL (exp, op0);
return op0; return op0;
......
...@@ -705,7 +705,8 @@ cselib_hash_rtx (rtx x, int create) ...@@ -705,7 +705,8 @@ cselib_hash_rtx (rtx x, int create)
return e->value; return e->value;
case DEBUG_EXPR: 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; return hash ? hash : (unsigned int) DEBUG_EXPR;
case CONST_INT: case CONST_INT:
......
...@@ -321,7 +321,8 @@ print_rtx (const_rtx in_rtx) ...@@ -321,7 +321,8 @@ print_rtx (const_rtx in_rtx)
else if (i == 0 && GET_CODE (in_rtx) == DEBUG_EXPR) else if (i == 0 && GET_CODE (in_rtx) == DEBUG_EXPR)
{ {
#ifndef GENERATOR_FILE #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 #endif
} }
break; break;
......
...@@ -930,6 +930,9 @@ extern const char * const reg_note_name[]; ...@@ -930,6 +930,9 @@ extern const char * const reg_note_name[];
#define NOTE_DURING_CALL_P(RTX) \ #define NOTE_DURING_CALL_P(RTX) \
(RTL_FLAG_CHECK1("NOTE_VAR_LOCATION_DURING_CALL_P", (RTX), NOTE)->call) (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 /* Possible initialization status of a variable. When requested
by the user, this information is tracked and recorded in the DWARF by the user, this information is tracked and recorded in the DWARF
debug information, along with the variable's location. */ debug information, along with the variable's location. */
......
...@@ -522,7 +522,7 @@ print_value (char *buf, const_rtx x, int verbose) ...@@ -522,7 +522,7 @@ print_value (char *buf, const_rtx x, int verbose)
cur = safe_concat (buf, cur, "]"); cur = safe_concat (buf, cur, "]");
break; break;
case DEBUG_EXPR: 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); cur = safe_concat (buf, cur, t);
break; break;
default: default:
......
...@@ -6304,7 +6304,7 @@ vt_expand_loc_callback (rtx x, bitmap regs, int max_depth, void *data) ...@@ -6304,7 +6304,7 @@ vt_expand_loc_callback (rtx x, bitmap regs, int max_depth, void *data)
return result; return result;
case DEBUG_EXPR: case DEBUG_EXPR:
dv = dv_from_decl (XTREE (x, 0)); dv = dv_from_decl (DEBUG_EXPR_TREE_DECL (x));
xret = NULL; xret = NULL;
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment