------- Comment #123 from jv244 at cam dot ac dot uk 2007-06-27 13:54 ------- (In reply to comment #121) > (In reply to comment #119) > > > > I might try to find out which module gets miscompiled, but this could be a > > bit > > of a slow process. > > > miscompilation happens with the module qs_neighbor_lists. It is a module with > lots of dependencies, so I don't think I will get a reduced testcase for this. Compiling that module under valgrind gives an error:
valgrind --tool=memcheck /data03/vondele/gcc_4_2_0/build/libexec/gcc/x86_64-unknown-linux-gnu/4.2.0/f951 qs_neighbor_lists.f90 -march=k8 -mtune=k8 -quiet -dumpbase qs_neighbor_lists.f90 -auxbase qs_neighbor_lists -O3 -version -ffast-math -ftree-vectorize -ftree-vectorizer-verbose=1 -I /data03/vondele/gcc_4_2_0/build/lib/gcc/x86_64-unknown-linux-gnu/4.2.0/finclude -o /tmp/ccoFFIrV.s ==30523== Conditional jump or move depends on uninitialised value(s) ==30523== at 0x706E08: vrp_evaluate_conditional_warnv (tree-vrp.c:4186) ==30523== by 0x706F9C: vrp_evaluate_conditional (tree-vrp.c:4318) ==30523== by 0x4B6E9F: substitute_and_fold (tree-ssa-propagate.c:1053) ==30523== by 0x700F04: execute_vrp (tree-vrp.c:5318) ==30523== by 0x6F9F27: execute_one_pass (passes.c:881) ==30523== by 0x6FA08B: execute_pass_list (passes.c:932) ==30523== by 0x6FA09D: execute_pass_list (passes.c:933) ==30523== by 0x48CCCD: tree_rest_of_compilation (tree-optimize.c:463) ==30523== by 0x742363: cgraph_expand_function (cgraphunit.c:1244) ==30523== by 0x742C8D: cgraph_optimize (cgraphunit.c:1309) ==30523== by 0x4633DC: gfc_be_parse_file (f95-lang.c:307) ==30523== by 0x6DBF92: toplev_main (toplev.c:1033) also, I checked all vectorized loops in the code path that gets executed for the testcase, and there is only one trivial one (zeroing a freshly allocated array). Rewriting that bit so that it doesn't get vectorized still somehow triggers the bug. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29975