From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16086 invoked by alias); 11 Mar 2010 15:11:10 -0000 Received: (qmail 16010 invoked by uid 48); 11 Mar 2010 15:10:56 -0000 Date: Thu, 11 Mar 2010 15:11:00 -0000 Subject: [Bug rtl-optimization/43332] New: valgrind warns about using uninitialized variable with -fsched-pressure -fschedule-insns X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "zsojka at seznam dot cz" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-03/txt/msg01064.txt.bz2 This can be related to pr42941 Command line: gcc -fschedule-insns -fsched-pressure testcase.c ---- testcase.c ---- extern void exit(int); int main(int argc, char *argv[]) { exit(0); } -------------------- gcc has to be compiled with valgrind checking to show this warning: $ valgrind -q --track-origins=yes /mnt/sdb1/build-157335-lto-checking-valgrind/gcc/cc1 -fschedule-insns -fsched-pressure testcase.c -quiet ==26448== Conditional jump or move depends on uninitialised value(s) ==26448== at 0xACFEE7: setup_insn_max_reg_pressure (haifa-sched.c:1589) ==26448== by 0x6CFA41: schedule_insns (sched-rgn.c:2965) ==26448== by 0x6CFC2D: rest_of_handle_sched (sched-rgn.c:3512) ==26448== by 0x679D8D: execute_one_pass (passes.c:1567) ==26448== by 0x679FF4: execute_pass_list (passes.c:1622) ==26448== by 0x67A006: execute_pass_list (passes.c:1623) ==26448== by 0x749E2F: tree_rest_of_compilation (tree-optimize.c:413) ==26448== by 0x876780: cgraph_expand_function (cgraphunit.c:1545) ==26448== by 0x87717F: cgraph_output_in_order (cgraphunit.c:1721) ==26448== by 0x8789D5: cgraph_optimize (cgraphunit.c:1869) ==26448== by 0x878BD4: cgraph_finalize_compilation_unit (cgraphunit.c:1093) ==26448== by 0x4A78CA: c_write_global_declarations (c-decl.c:9510) ==26448== Uninitialised value was created by a client request ==26448== at 0x4FC1AF: ggc_alloc_stat (ggc-page.c:1228) ==26448== by 0x6C06E0: rtx_alloc_stat (rtl.c:199) ==26448== by 0x597FDA: emit_barrier_after (emit-rtl.c:4481) ==26448== by 0x525B7A: expand_call (calls.c:2911) ==26448== by 0x50F2ED: expand_builtin (builtins.c:6403) ==26448== by 0x5AFF20: expand_expr_real_1 (expr.c:9247) ==26448== by 0x52E2EB: expand_gimple_stmt (cfgexpand.c:1783) ==26448== by 0x52F0D7: expand_gimple_basic_block (cfgexpand.c:3377) ==26448== by 0x532847: gimple_expand_cfg (cfgexpand.c:3826) ==26448== by 0x679D8D: execute_one_pass (passes.c:1567) ==26448== by 0x679FF4: execute_pass_list (passes.c:1622) ==26448== by 0x749E2F: tree_rest_of_compilation (tree-optimize.c:413) ==26448== ==26448== Conditional jump or move depends on uninitialised value(s) ==26448== at 0xACFEE7: setup_insn_max_reg_pressure (haifa-sched.c:1589) ==26448== by 0xAD4E42: schedule_insn (haifa-sched.c:1632) ==26448== by 0xAD7598: schedule_block (haifa-sched.c:3143) ==26448== by 0x6CFAA9: schedule_insns (sched-rgn.c:3001) ==26448== by 0x6CFC2D: rest_of_handle_sched (sched-rgn.c:3512) ==26448== by 0x679D8D: execute_one_pass (passes.c:1567) ==26448== by 0x679FF4: execute_pass_list (passes.c:1622) ==26448== by 0x67A006: execute_pass_list (passes.c:1623) ==26448== by 0x749E2F: tree_rest_of_compilation (tree-optimize.c:413) ==26448== by 0x876780: cgraph_expand_function (cgraphunit.c:1545) ==26448== by 0x87717F: cgraph_output_in_order (cgraphunit.c:1721) ==26448== by 0x8789D5: cgraph_optimize (cgraphunit.c:1869) ==26448== Uninitialised value was created by a client request ==26448== at 0x4FC1AF: ggc_alloc_stat (ggc-page.c:1228) ==26448== by 0x6C06E0: rtx_alloc_stat (rtl.c:199) ==26448== by 0x597FDA: emit_barrier_after (emit-rtl.c:4481) ==26448== by 0x525B7A: expand_call (calls.c:2911) ==26448== by 0x50F2ED: expand_builtin (builtins.c:6403) ==26448== by 0x5AFF20: expand_expr_real_1 (expr.c:9247) ==26448== by 0x52E2EB: expand_gimple_stmt (cfgexpand.c:1783) ==26448== by 0x52F0D7: expand_gimple_basic_block (cfgexpand.c:3377) ==26448== by 0x532847: gimple_expand_cfg (cfgexpand.c:3826) ==26448== by 0x679D8D: execute_one_pass (passes.c:1567) ==26448== by 0x679FF4: execute_pass_list (passes.c:1622) ==26448== by 0x749E2F: tree_rest_of_compilation (tree-optimize.c:413) ==26448== -- Summary: valgrind warns about using uninitialized variable with - fsched-pressure -fschedule-insns Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: zsojka at seznam dot cz GCC host triplet: x86_64-pc-linux-gnu GCC target triplet: x86_64-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43332