Commit d301c1a4 by Jakub Jelinek Committed by Jakub Jelinek

re PR debug/90733 (ICE in simplify_subreg, at simplify-rtx.c:6440)

	PR debug/90733
	* var-tracking.c (vt_expand_loc_callback): Don't create raw subregs
	with VOIDmode inner operands.

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

From-SVN: r271952
parent e0aecd6e
2019-06-05 Jakub Jelinek <jakub@redhat.com>
PR debug/90733
* var-tracking.c (vt_expand_loc_callback): Don't create raw subregs
with VOIDmode inner operands.
2019-06-05 Richard Biener <rguenther@suse.de> 2019-06-05 Richard Biener <rguenther@suse.de>
PR middle-end/90726 PR middle-end/90726
......
2019-06-05 Jakub Jelinek <jakub@redhat.com>
PR debug/90733
* gcc.dg/pr90733.c: New test.
2019-06-05 Richard Biener <rguenther@suse.de> 2019-06-05 Richard Biener <rguenther@suse.de>
PR middle-end/90726 PR middle-end/90726
......
/* PR debug/90733 */
/* { dg-do compile } */
/* { dg-options "-g -O2 -w" } */
struct S { unsigned a : 1; };
union U { struct S b; _Complex unsigned c; };
union U
foo (union U d)
{
union U e = d;
return e;
}
int
bar (void)
{
union U x, y;
x.c = x.b.a;
y = foo (x);
return x.c != y.c;
}
...@@ -8491,7 +8491,7 @@ vt_expand_loc_callback (rtx x, bitmap regs, ...@@ -8491,7 +8491,7 @@ vt_expand_loc_callback (rtx x, bitmap regs,
/* Invalid SUBREGs are ok in debug info. ??? We could try /* Invalid SUBREGs are ok in debug info. ??? We could try
alternate expansions for the VALUE as well. */ alternate expansions for the VALUE as well. */
if (!result) if (!result && GET_MODE (subreg) != VOIDmode)
result = gen_rtx_raw_SUBREG (GET_MODE (x), subreg, SUBREG_BYTE (x)); result = gen_rtx_raw_SUBREG (GET_MODE (x), subreg, SUBREG_BYTE (x));
return result; return result;
......
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