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
+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>
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>
PR middle-end/90726
--- /dev/null
+/* 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;
+}
/* Invalid SUBREGs are ok in debug info. ??? We could try
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));
return result;