diff mbox

Fix PR60706

Message ID alpine.LSU.2.11.1404081204350.31108@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener April 8, 2014, 10:06 a.m. UTC
Dave confirmed that a patch like the following fixes the
inconsistency in printing double-ints that fit 64bits on
HWI32 hosts vs. HWI64 hosts.  When the host has a 64bit
type, that is.

Bootstrap running on x86_64-unknown-linux-gnu.

Dave, did testing on hppa2.0w-hp-hpux11.11 show any testsuite
fallout?

Thanks,
Richard.

2014-04-08  Richard Biener  <rguenther@suse.de>

	PR middle-end/60706
	* tree-pretty-print.c (pp_double_int): For HWI32 hosts with
	a 64bit widest int print double-int similar to on HWI64 hosts.

Comments

John David Anglin April 8, 2014, 12:04 p.m. UTC | #1
On 8-Apr-14, at 6:06 AM, Richard Biener wrote:

> Dave, did testing on hppa2.0w-hp-hpux11.11 show any testsuite
> fallout?


No.  It fixes the PR and there were no observed regressions on  
hppa2.0w-hp-hpux11.11,
hppa-unknown-linux-gnu and hppa64-hp-hpux11.11.  This covers host wide  
integers
of 32 and 64 bits.

Dave
--
John David Anglin	dave.anglin@bell.net
diff mbox

Patch

Index: gcc/tree-pretty-print.c
===================================================================
--- gcc/tree-pretty-print.c	(revision 209210)
+++ gcc/tree-pretty-print.c	(working copy)
@@ -3465,6 +3467,12 @@  pp_double_int (pretty_printer *pp, doubl
     pp_wide_integer (pp, d.low);
   else if (d.fits_uhwi ())
     pp_unsigned_wide_integer (pp, d.low);
+  else if (HOST_BITS_PER_DOUBLE_INT == HOST_BITS_PER_WIDEST_INT)
+    pp_scalar (pp,
+	       uns
+	       ? HOST_WIDEST_INT_PRINT_UNSIGNED : HOST_WIDEST_INT_PRINT_DEC,
+	       (HOST_WIDEST_INT) ((((unsigned HOST_WIDEST_INT) d.high << 1)
+				   << (HOST_BITS_PER_WIDE_INT - 1)) | d.low));
   else
     {
       unsigned HOST_WIDE_INT low = d.low;