re PR debug/50827 (ICE: RTL check: expected elt 0 type 'e' or 'u', have '0' (rtx entry_value) in loc_cmp, at var-tracking.c:3011)

PR debug/50827
	* var-tracking.c (loc_cmp): For ENTRY_VALUEs use ENTRY_VALUE_EXP
	macro instead of XEXP.

	* gcc.dg/pr50827.c: New test.

From-SVN: r181597
This commit is contained in:
Jakub Jelinek 2011-11-21 22:07:19 +01:00 committed by Jakub Jelinek
parent 49f7dc9de6
commit 7fefb1d1a9
4 changed files with 29 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2011-11-21 Jakub Jelinek <jakub@redhat.com>
PR debug/50827
* var-tracking.c (loc_cmp): For ENTRY_VALUEs use ENTRY_VALUE_EXP
macro instead of XEXP.
2011-11-21 Andreas Tobler <andreast@fgznet.ch>
* configure: Regenerate.

View File

@ -1,3 +1,8 @@
2011-11-21 Jakub Jelinek <jakub@redhat.com>
PR debug/50827
* gcc.dg/pr50827.c: New test.
2011-11-21 Ed Smith-Rowland <3dw4rd@verizon.net>
PR c++/50958

View File

@ -0,0 +1,17 @@
/* PR debug/50827 */
/* { dg-do compile } */
/* { dg-options "-g -O2 -funroll-loops" } */
void
foo (int w, int x, int *y, int *z)
{
float f;
while (w--)
{
f = x;
if (y)
*y = (__INTPTR_TYPE__) y + w;
if (z)
*z = w;
}
}

View File

@ -3008,7 +3008,7 @@ loc_cmp (rtx x, rtx y)
if (GET_CODE (y) != ENTRY_VALUE)
return 1;
gcc_assert (GET_MODE (x) == GET_MODE (y));
return loc_cmp (XEXP (x, 0), XEXP (y, 0));
return loc_cmp (ENTRY_VALUE_EXP (x), ENTRY_VALUE_EXP (y));
}
if (GET_CODE (y) == ENTRY_VALUE)