public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [lto][patch] Fix build
@ 2008-10-24  5:08 Rafael Espindola
  2008-10-24 12:37 ` Diego Novillo
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael Espindola @ 2008-10-24  5:08 UTC (permalink / raw)
  To: gcc-patches; +Cc: Diego Novillo, Simon Baldwin

[-- Attachment #1: Type: text/plain, Size: 295 bytes --]

2008-10-08 Rafael Espindola  <espindola@google.com>

	* lto-lang.c (input_node): Avoid casts from pointers to ints of
	different types.

Cheers,
-- 
Rafael Avila de Espindola

Google | Gordon House | Barrow Street | Dublin 4 | Ireland
Registered in Dublin, Ireland | Registration Number: 368047

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: fix.patch --]
[-- Type: text/x-diff; name=fix.patch, Size: 918 bytes --]

diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index d49d92d..52872fa 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -1187,7 +1187,7 @@ input_node (struct lto_file_decl_data* file_data,
       node->global.insns = insns;
 
       /* Store a reference for now, and fix up later to be a pointer.  */
-      node->global.inlined_to = (cgraph_node_ptr) ref;
+      node->global.inlined_to = (cgraph_node_ptr) (intptr_t) ref;
 
       node->global.estimated_growth = estimated_growth;
       node->global.inlined = inlined;
@@ -1319,7 +1319,7 @@ input_cgraph_1 (struct lto_file_decl_data* file_data,
     {
       for (node = cgraph_nodes; node; node = node->next)
         {
-          const int ref = (int) node->global.inlined_to;
+          const int ref = (int) (intptr_t) node->global.inlined_to;
 
           /* Fixup inlined_to from reference to pointer.  */
           if (ref != LCC_NOT_FOUND)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [lto][patch] Fix build
  2008-10-24  5:08 [lto][patch] Fix build Rafael Espindola
@ 2008-10-24 12:37 ` Diego Novillo
  0 siblings, 0 replies; 2+ messages in thread
From: Diego Novillo @ 2008-10-24 12:37 UTC (permalink / raw)
  To: Rafael Espindola; +Cc: gcc-patches, Simon Baldwin

On Thu, Oct 23, 2008 at 18:18, Rafael Espindola <espindola@google.com> wrote:

> 2008-10-08 Rafael Espindola  <espindola@google.com>
>
>        * lto-lang.c (input_node): Avoid casts from pointers to ints of
>        different types.

OK.  Patches like this one qualify as obviously correct, feel free to
just commit them.


Thanks.  Diego.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-10-24 11:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-24  5:08 [lto][patch] Fix build Rafael Espindola
2008-10-24 12:37 ` Diego Novillo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).