Commit 132b4e82 by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/43557 (ICE with -combine and -g)

	PR debug/43557
	* cfgexpand.c (expand_debug_expr): Handle VOIDmode mode like
	BLKmode.

	* gcc.dg/pr43557-1.c: New test.
	* gcc.dg/pr43557-2.c: New file.

From-SVN: r157852
parent 9db4e878
2010-03-31 Jakub Jelinek <jakub@redhat.com>
PR debug/43557
* cfgexpand.c (expand_debug_expr): Handle VOIDmode mode like
BLKmode.
2010-03-31 Jie Zhang <jie@codesourcery.com> 2010-03-31 Jie Zhang <jie@codesourcery.com>
PR 43562 PR 43562
......
...@@ -2358,7 +2358,8 @@ expand_debug_expr (tree exp) ...@@ -2358,7 +2358,8 @@ expand_debug_expr (tree exp)
/* If op0 is not BLKmode, but BLKmode is, adjust_mode /* If op0 is not BLKmode, but BLKmode is, adjust_mode
below would ICE. While it is likely a FE bug, below would ICE. While it is likely a FE bug,
try to be robust here. See PR43166. */ try to be robust here. See PR43166. */
|| mode == BLKmode) || mode == BLKmode
|| (mode == VOIDmode && GET_MODE (op0) != VOIDmode))
{ {
gcc_assert (MEM_P (op0)); gcc_assert (MEM_P (op0));
op0 = adjust_address_nv (op0, mode, 0); op0 = adjust_address_nv (op0, mode, 0);
......
2010-03-31 Jakub Jelinek <jakub@redhat.com>
PR debug/43557
* gcc.dg/pr43557-1.c: New test.
* gcc.dg/pr43557-2.c: New file.
2010-03-31 Jie Zhang <jie@codesourcery.com> 2010-03-31 Jie Zhang <jie@codesourcery.com>
PR 43562 PR 43562
......
/* PR debug/43557 */
/* { dg-do compile } */
/* { dg-options "--combine -g -O2" } */
/* { dg-additional-sources "pr43557-2.c" } */
struct S
{
int v;
} g;
void
f1 (void)
{
struct S *s = &g;
s->v = 0;
}
/* PR debug/43557 */
/* { dg-do compile } */
extern struct S g;
void
f2 (void)
{
&g;
}
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