OSDN Git Service

correct typographical errors.
[pf3gnuchains/gcc-fork.git] / gcc / profile.c
index ac46046..b8a43de 100644 (file)
@@ -59,6 +59,8 @@ along with GCC; see the file COPYING3.  If not see
 #include "regs.h"
 #include "expr.h"
 #include "function.h"
+#include "basic-block.h"
+#include "diagnostic-core.h"
 #include "toplev.h"
 #include "coverage.h"
 #include "value-prof.h"
@@ -938,7 +940,8 @@ branch_prob (void)
          for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev (&gsi))
            {
              last = gsi_stmt (gsi);
-             if (gimple_has_location (last))
+             if (!is_gimple_debug (last)
+                 && gimple_has_location (last))
                break;
            }