Patchwork : 2 of 7 Fix of PR target/53912 bootstrap fails using default c++ mode in stage 2 and 3 for native x86_64-w64-mingw32

login
register
mail settings
Submitter Kai Tietz
Date Nov. 29, 2012, 12:05 p.m.
Message ID <CAEwic4akNaLSfVd+OoOgZ-6JJFF6sHYzm6eRzdiu5dK0=eBkHA@mail.gmail.com>
Download mbox | patch
Permalink /patch/202723/
State New
Headers show

Comments

Kai Tietz - Nov. 29, 2012, 12:05 p.m.
Hello,

this trivial patch fixes a bootstrap issue on LLP64 hosts.

ChangeLog

2012-11-29 Kai Tietz

	PR target/53912
	* ggc-common.c (POINTER_HASH): Cast from pointer via intptr_t.

Tested for i686-w64-mingw32, x86_64-w64-mingw32, and
x86_64-unknown-gnu-linux. Ok for apply?

Regards,
Kai
Kai Tietz - Dec. 2, 2012, 9:10 a.m.
Ping

2012/11/29 Kai Tietz <ktietz70@googlemail.com>:
> Hello,
>
> this trivial patch fixes a bootstrap issue on LLP64 hosts.
>
> ChangeLog
>
> 2012-11-29 Kai Tietz
>
>         PR target/53912
>         * ggc-common.c (POINTER_HASH): Cast from pointer via intptr_t.
>
> Tested for i686-w64-mingw32, x86_64-w64-mingw32, and
> x86_64-unknown-gnu-linux. Ok for apply?
>
> Regards,
> Kai
>
> Index: ggc-common.c
> ===================================================================
> --- ggc-common.c        (Revision 193925)
> +++ ggc-common.c        (Arbeitskopie)
> @@ -304,7 +304,7 @@ struct ptr_data
>    enum gt_types_enum type;
>  };
>
> -#define POINTER_HASH(x) (hashval_t)((long)x >> 3)
> +#define POINTER_HASH(x) (hashval_t)((intptr_t)x >> 3)
>
>  /* Register an object in the hash table.  */
Ian Taylor - Dec. 3, 2012, 3:50 a.m.
On Thu, Nov 29, 2012 at 4:05 AM, Kai Tietz <ktietz70@googlemail.com> wrote:
>
> 2012-11-29 Kai Tietz
>
>         PR target/53912
>         * ggc-common.c (POINTER_HASH): Cast from pointer via intptr_t.

This is OK.

Thanks.

Ian

Patch

Index: ggc-common.c
===================================================================
--- ggc-common.c        (Revision 193925)
+++ ggc-common.c        (Arbeitskopie)
@@ -304,7 +304,7 @@  struct ptr_data
   enum gt_types_enum type;
 };

-#define POINTER_HASH(x) (hashval_t)((long)x >> 3)
+#define POINTER_HASH(x) (hashval_t)((intptr_t)x >> 3)

 /* Register an object in the hash table.  */