On 01/25/2012 03:10 PM, Jakub Jelinek wrote:
Hi!

This PR is about a warning that rev may be used uninitialized when
sched_get_condition_with_rev_uncached is inlined into its caller.
It in fact may be used uninitialized if PATTERN (insn) is ever NULL.
But IMNSHO everything in the compiler assumes that PATTERN of an insn
is always non-NULL, so IMHO instead of just moving the
if (rev) *rev = false; hunk above the test we should just remove this test.
Bootstrapped/regtested on x86_64-linux and i686-linux, ok for trunk?

2012-01-25  Jakub Jelinek<ja...@redhat.com>

        PR middle-end/51986
        * sched-deps.c (sched_get_condition_with_rev_uncached): Don't test
        for pat == 0.

--- gcc/sched-deps.c.jj 2011-12-01 11:45:06.000000000 +0100
+++ gcc/sched-deps.c    2012-01-25 15:27:49.523165701 +0100
@@ -521,9 +521,6 @@ sched_get_condition_with_rev_uncached (c
    rtx pat = PATTERN (insn);
    rtx src;

-  if (pat == 0)
-    return 0;
-
    if (rev)
      *rev = false;

Ok.  Thanks, Jakub.

Reply via email to