version used for testing: GNU Fortran (GCC) version 4.4.0 20090112 (experimental) [trunk revision 143288] (x86_64-unknown-linux-gnu) compiled by GNU C version 4.4.0 20090112 (experimental) [trunk revision 143288], GMP version 4.2.2, MPFR version 2.3.1.
valgrind --tool=memcheck /data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.4.0/f951 all.f90 -march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=1024 -mtune=k8 -quiet -dumpbase all.f90 -auxbase all -O3 -version -ffast-math -ftree-vectorize -ffree-form -fintrinsic-modules-path /data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.4.0/finclude -o /tmp/ccIEjF0W.s ==22900== ==22900== Invalid write of size 8 ==22900== at 0x7A028D: reserve_phi_args_for_new_edge (tree-flow-inline.h:299) ==22900== by 0xAE0332: redirect_edge_succ_nodup (cfg.c:410) ==22900== by 0x751AC0: gimple_redirect_edge_and_branch (tree-cfg.c:4801) ==22900== by 0xAF0479: redirect_edge_and_branch (cfghooks.c:323) ==22900== by 0x75CFBC: cleanup_tree_cfg_bb (tree-cfgcleanup.c:413) ==22900== by 0x75D71C: cleanup_tree_cfg (tree-cfgcleanup.c:594) ==22900== by 0x69EE44: execute_function_todo (passes.c:923) ==22900== by 0x69F06E: execute_todo (passes.c:1025) ==22900== by 0x69F384: execute_one_pass (passes.c:1302) ==22900== by 0x69F574: execute_pass_list (passes.c:1328) ==22900== by 0x69F58C: execute_pass_list (passes.c:1329) ==22900== by 0x69F58C: execute_pass_list (passes.c:1329) ==22900== Address 0x200000008 is not stack'd, malloc'd or (recently) free'd all.f90: In function build_se_core_matrix: all.f90:364860: internal compiler error: Segmentation fault Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. the testcase is all.f90 in http://www.pci.unizh.ch/vandevondele/tmp/CP2K_gcc_2007_06.tgz (see also comment #112 in PR29975). which unfortunately means it takes a couple of hours to reproduce through valgrind. I started the valgrinded compilation after having a segfault with a normal compilation that I couldn't reproduce in gdb. The latter really is a bit strange, just testing it again, segfaults out of gdb, doesn't segfault within gdb.. -- Summary: valgrind returns Invalid write in reserve_phi_args_for_new_edge Product: gcc Version: 4.4.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=38814