#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"
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;
}