* lra-eliminations.c (move_plus_up): Don't change anything if either
the outer or inner subreg mode is not MODE_INT.
* dwarf2out.c (mem_loc_descriptor): For SUBREG, if outer mode is
integral <= DWARF2_ADDR_SIZE, convert to untyped afterwards.
* gcc.dg/guality/pr69244.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232382
138bc75d-0d04-0410-961f-
82ee72b054a4
+2016-01-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/69244
+ * lra-eliminations.c (move_plus_up): Don't change anything if either
+ the outer or inner subreg mode is not MODE_INT.
+ * dwarf2out.c (mem_loc_descriptor): For SUBREG, if outer mode is
+ integral <= DWARF2_ADDR_SIZE, convert to untyped afterwards.
+
2016-01-14 Alan Lawrence <alan.lawrence@arm.com>
* doc/md.texi (reduc_smin_@var{m}, reduc_smax_@var{m},
cvt->dw_loc_oprnd1.v.val_die_ref.die = type_die;
cvt->dw_loc_oprnd1.v.val_die_ref.external = 0;
add_loc_descr (&mem_loc_result, cvt);
+ if (GET_MODE_CLASS (mode) == MODE_INT
+ && GET_MODE_SIZE (mode) <= DWARF2_ADDR_SIZE)
+ {
+ /* Convert it to untyped afterwards. */
+ cvt = new_loc_descr (DW_OP_GNU_convert, 0, 0);
+ add_loc_descr (&mem_loc_result, cvt);
+ }
}
break;
subreg_reg_mode = GET_MODE (subreg_reg);
if (GET_CODE (x) == SUBREG && GET_CODE (subreg_reg) == PLUS
&& GET_MODE_SIZE (x_mode) <= GET_MODE_SIZE (subreg_reg_mode)
- && CONSTANT_P (XEXP (subreg_reg, 1)))
+ && CONSTANT_P (XEXP (subreg_reg, 1))
+ && GET_MODE_CLASS (x_mode) == MODE_INT
+ && GET_MODE_CLASS (subreg_reg_mode) == MODE_INT)
{
rtx cst = simplify_subreg (x_mode, XEXP (subreg_reg, 1), subreg_reg_mode,
subreg_lowpart_offset (x_mode,
+2016-01-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/69244
+ * gcc.dg/guality/pr69244.c: New test.
+
2016-01-14 Uros Bizjak <ubizjak@gmail.com>
* lib/target-supports.exp (check_effective_target_issignaling):
--- /dev/null
+/* PR debug/69244 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+union U { float f; int i; };
+float a, b;
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ asm volatile ("" : : "g" (&a), "g" (&b) : "memory");
+}
+
+int
+main ()
+{
+ float e = a;
+ foo ();
+ float d = e;
+ union U p;
+ p.f = d += 2;
+ int c = p.i - 4;
+ asm (NOP : : : "memory");
+ b = c;
+ return 0;
+}
+
+/* { dg-final { gdb-test 25 "c" "p.i-4" } } */