as discussed in PR 29975 CP2K gets miscompiled by gfortran 4.2.0 (see comments 119 to 125).
sources (src/all.f90) can be obtained from: http://www.pci.unizh.ch/vandevondele/tmp/CP2K_gcc_2007_06.tgz and are miscompiled with -O3 -ffast-math -ftree-vectorize -march=native the module that gets miscompiled is qs_neighbor_lists. under valgrind, compilation of that module shows: 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) as discussed in PR29975, the combination of options above is needed to trigger the bug. -- Summary: [4.2] vrp_evaluate_conditional_warnv (tree-vrp.c:4186) at -O3 -ffast-math -ftree-vectorize -march=native Product: gcc Version: 4.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jv244 at cam dot ac dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32521