]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR bootstrap/46528 (profiledbootstrap failure)
authorJakub Jelinek <jakub@redhat.com>
Mon, 6 Dec 2010 19:30:31 +0000 (20:30 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 6 Dec 2010 19:30:31 +0000 (20:30 +0100)
PR tree-optimization/46528
PR debug/46338
* profile.c (branch_prob): Make sure last is never set to a debug
stmt.

From-SVN: r167515

gcc/ChangeLog
gcc/profile.c

index 7412c201f7c442692bcdac87da2c7c5a40e4df18..48c60c039c32def00512513f3ca14a77fbc4a4e0 100644 (file)
@@ -1,5 +1,10 @@
 2010-12-06  Jakub Jelinek  <jakub@redhat.com>
 
+       PR tree-optimization/46528
+       PR debug/46338
+       * profile.c (branch_prob): Make sure last is never set to a debug
+       stmt.
+
        PR debug/46771
        * reginfo.c (init_subregs_of_mode): Don't call find_subregs_of_mode
        on DEBUG_INSNs.
index 9e8c2036ca1dbf94fc1c1befbaf092f6cbf04ca0..606e3b2e86646d379a9f35feb01942b1d0ca4578 100644 (file)
@@ -936,11 +936,12 @@ branch_prob (void)
          /* It may happen that there are compiler generated statements
             without a locus at all.  Go through the basic block from the
             last to the first statement looking for a locus.  */
-         for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev (&gsi))
+         for (gsi = gsi_last_nondebug_bb (bb);
+              !gsi_end_p (gsi);
+              gsi_prev_nondebug (&gsi))
            {
              last = gsi_stmt (gsi);
-             if (!is_gimple_debug (last)
-                 && gimple_has_location (last))
+             if (gimple_has_location (last))
                break;
            }