Hi Bernd, Hi Jie,

  I am applying the patch below as an obvious fix for this problem
  whilst compiling the BFIN port of GCC:
  
gcc/config/bfin/bfin.c: In function 'bool hwloop_optimize(hwloop_info)':
gcc/config/bfin/bfin.c:3481:41: error: request for member 'flags' in 
'VEC_last_1<edge_def*>(loop->hwloop_info_d::incoming, ((const 
char*)"/work/sources/gcc/current/gcc/config/bfin/bfin.c"), 3481u, ((const 
char*)(& __FUNCTION__)))', which is of pointer type 'edge_def*' (maybe you 
meant to use '->' ?)
gcc/config/bfin/bfin.c:3750:41: error: request for member 'flags' in 
'VEC_last_1<edge_def*>(loop->hwloop_info_d::incoming, ((const 
char*)"/work/sources/gcc/current/gcc/config/bfin/bfin.c"), 3750u, ((const 
char*)(& __FUNCTION__)))', which is of pointer type 'edge_def*' (maybe you 
meant to use '->' ?)

  With this patch applied the bfin port now compiles correctly.

  Cheers
    Nick

gcc/ChangeLog
2012-08-16  Nick Clifton  <ni...@redhat.com>

        * config/bfin/bfin.c (hwloop_optimize): Fix use of VEC_last macro.

Index: gcc/config/bfin/bfin.c
===================================================================
--- gcc/config/bfin/bfin.c      (revision 190438)
+++ gcc/config/bfin/bfin.c      (working copy)
@@ -3478,7 +3478,7 @@
       /* If we have to insert the LSETUP before a jump, count that jump in the
         length.  */
       if (VEC_length (edge, loop->incoming) > 1
-         || !(VEC_last (edge, loop->incoming).flags & EDGE_FALLTHRU))
+         || !(VEC_last (edge, loop->incoming)->flags & EDGE_FALLTHRU))
        {
          gcc_assert (JUMP_P (insn));
          insn = PREV_INSN (insn);
@@ -3747,7 +3747,7 @@
     {
       rtx prev = BB_END (loop->incoming_src);
       if (VEC_length (edge, loop->incoming) > 1
-         || !(VEC_last (edge, loop->incoming).flags & EDGE_FALLTHRU))
+         || !(VEC_last (edge, loop->incoming)->flags & EDGE_FALLTHRU))
        {
          gcc_assert (JUMP_P (prev));
          prev = PREV_INSN (prev);

Reply via email to