Patchwork RFA (bfin): fix PR46737

login
register
mail settings
Submitter Joern Rennecke
Date Dec. 6, 2010, 4:31 p.m.
Message ID <20101206113144.d2u33tuysk0w40sk-nzlynne@webmail.spamcop.net>
Download mbox | patch
Permalink /patch/74386/
State New
Headers show

Comments

Joern Rennecke - Dec. 6, 2010, 4:31 p.m.
cross-built on x86_64-pc-linux-gnu .
2010-12-06  Joern Rennecke  <amylaar@spamcop.net>

	PR target/46737
	* config/bfin/bfin.c (BB_AUX_INDEX): Cast to size_t.
	(bfin_reorder_loops): Change type of index to size_t.
Richard Guenther - Dec. 6, 2010, 5:05 p.m.
On Mon, Dec 6, 2010 at 5:31 PM, Joern Rennecke <amylaar@spamcop.net> wrote:
> cross-built on x86_64-pc-linux-gnu .

I'm sure that size_t is wrong on win64.  Please use intptr_t, it's
always available on the host.

Richard.

> 2010-12-06  Joern Rennecke  <amylaar@spamcop.net>
>
>        PR target/46737
>        * config/bfin/bfin.c (BB_AUX_INDEX): Cast to size_t.
>        (bfin_reorder_loops): Change type of index to size_t.
>
> Index: config/bfin/bfin.c
> ===================================================================
> --- config/bfin/bfin.c  (revision 167494)
> +++ config/bfin/bfin.c  (working copy)
> @@ -4662,7 +4662,7 @@ free_loops (loop_info loops)
>     }
>  }
>
> -#define BB_AUX_INDEX(BB) ((unsigned)(BB)->aux)
> +#define BB_AUX_INDEX(BB) ((size_t)(BB)->aux)
>
>  /* The taken-branch edge from the loop end can actually go forward.  Since
> the
>    Blackfin's LSETUP instruction requires that the loop end be after the
> loop
> @@ -4679,7 +4679,7 @@ bfin_reorder_loops (loop_info loops, FIL
>
>   for (loop = loops; loop; loop = loop->next)
>     {
> -      unsigned index;
> +      size_t index;
>       basic_block bb;
>       edge e;
>       edge_iterator ei;
>
>

Patch

Index: config/bfin/bfin.c
===================================================================
--- config/bfin/bfin.c	(revision 167494)
+++ config/bfin/bfin.c	(working copy)
@@ -4662,7 +4662,7 @@  free_loops (loop_info loops)
     }
 }
 
-#define BB_AUX_INDEX(BB) ((unsigned)(BB)->aux)
+#define BB_AUX_INDEX(BB) ((size_t)(BB)->aux)
 
 /* The taken-branch edge from the loop end can actually go forward.  Since the
    Blackfin's LSETUP instruction requires that the loop end be after the loop
@@ -4679,7 +4679,7 @@  bfin_reorder_loops (loop_info loops, FIL
 
   for (loop = loops; loop; loop = loop->next)
     {
-      unsigned index;
+      size_t index;
       basic_block bb;
       edge e;
       edge_iterator ei;