http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52210

             Bug #: 52210
           Summary: vect_model_simple_cost: reading uninitialised memory
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: dcb...@hotmail.com


Created attachment 26641
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=26641
C source code

I just tried to compile the attached code with flag -O3
under valgrind on latest trunk dated 20120211 on an AMD x86_64 box.

Valgrind said

==6796== Conditional jump or move depends on uninitialised value(s)
==6796==    at 0xAECAC5: vect_model_simple_cost(_stmt_vec_info*, int,
vect_def_type*, _slp_tree*) (tree-vect-stmts.c:800)
==6796==    by 0xB17569: vect_get_and_check_slp_defs(_loop_vec_info*,
_bb_vec_info*, _slp_tree*, gimple_statement_d*, int, bool,
VEC_slp_oprnd_info_heap**) (tree-vect-slp.c:327)
==6796==    by 0xB18EB0: vect_build_slp_tree(_loop_vec_info*, _bb_vec_info*,
_slp_tree**, unsigned int, int*, int*, int, unsigned int*, VEC_int_heap**,
VEC_slp_tree_heap**, unsigned int, bool*) (tree-vect-slp.c:868)
==6796==    by 0xB199E9: vect_build_slp_tree(_loop_vec_info*, _bb_vec_info*,
_slp_tree**, unsigned int, int*, int*, int, unsigned int*, VEC_int_heap**,
VEC_slp_tree_heap**, unsigned int, bool*) (tree-vect-slp.c:918)
==6796==    by 0xB1C7AD: vect_analyze_slp_instance(_loop_vec_info*,
_bb_vec_info*, gimple_statement_d*) (tree-vect-slp.c:1549)
==6796==    by 0xB1DDEF: vect_analyze_slp(_loop_vec_info*, _bb_vec_info*)
(tree-vect-slp.c:1649)
==6796==    by 0xB1E1C0: vect_slp_analyze_bb(basic_block_def*)
(tree-vect-slp.c:2056)
==6796==    by 0xB1F135: execute_vect_slp() (tree-vectorizer.c:265)
==6796==    by 0x885CEC: execute_one_pass(opt_pass*) (passes.c:2081)
==6796==    by 0x886266: execute_pass_list(opt_pass*) (passes.c:2136)
==6796==    by 0x9C424D: tree_rest_of_compilation(tree_node*)
(tree-optimize.c:422)
==6796==    by 0x61E63D: cgraph_expand_function(cgraph_node*)
(cgraphunit.c:1831)
==6796==

Preprocessed source code attached. Flag -O3 required.
This bug might be related to #45948

Reply via email to