diff mbox

: Fix for PR 55707 bootstrap fails in gcc/graphite-dependences.c error cast loses precision

Message ID 50E574D2.2000906@emrich-ebersheim.de
State New
Headers show

Commit Message

Rainer Emrich Jan. 3, 2013, 12:08 p.m. UTC
Hello,

this trivial patch fixes a bootstrap issue on LLP64 hosts.

	PR 55707
	* graphite-dependences.c (hash_poly_ddr_p): Cast from pointer via
	intptr_t.

Tested for x86_64-w64-mingw32 and x86_64-unknown-gnu-linux.

If OK for apply, Kai please commit.

Regards,

Rainer

Comments

Richard Biener Jan. 3, 2013, 12:14 p.m. UTC | #1
On Thu, Jan 3, 2013 at 1:08 PM, Rainer Emrich
<rainer@emrich-ebersheim.de> wrote:
> Hello,
>
> this trivial patch fixes a bootstrap issue on LLP64 hosts.
>
>         PR 55707
>         * graphite-dependences.c (hash_poly_ddr_p): Cast from pointer via
>         intptr_t.
>
> Tested for x86_64-w64-mingw32 and x86_64-unknown-gnu-linux.
>
> If OK for apply, Kai please commit.

Ok.

Thanks,
Richard.

> Regards,
>
> Rainer
>
> Index: graphite-dependences.c
> ===================================================================
> --- graphite-dependences.c      (Revision 194638)
> +++ graphite-dependences.c      (Arbeitskopie)
> @@ -56,7 +56,7 @@ hash_poly_ddr_p (const void *pddr)
>  {
>    const struct poly_ddr *p = (const struct poly_ddr *) pddr;
>
> -  return (hashval_t) ((long) PDDR_SOURCE (p) + (long) PDDR_SINK (p));
> +  return (hashval_t) ((intptr_t) PDDR_SOURCE (p) + (intptr_t) PDDR_SINK (p));
>  }
>
>  /* Returns true when PDDR has no dependence.  */
Kai Tietz Jan. 3, 2013, 4:49 p.m. UTC | #2
Hi Rainer,

applied at rev 194859.

Thanks,
Kai
diff mbox

Patch

Index: graphite-dependences.c
===================================================================
--- graphite-dependences.c      (Revision 194638)
+++ graphite-dependences.c      (Arbeitskopie)
@@ -56,7 +56,7 @@  hash_poly_ddr_p (const void *pddr)
 {
   const struct poly_ddr *p = (const struct poly_ddr *) pddr;

-  return (hashval_t) ((long) PDDR_SOURCE (p) + (long) PDDR_SINK (p));
+  return (hashval_t) ((intptr_t) PDDR_SOURCE (p) + (intptr_t) PDDR_SINK (p));
 }

 /* Returns true when PDDR has no dependence.  */