Downloading the code at http://www.pci.unizh.ch/vandevondele/tmp/all_cp2k_gfortran.f90.gz, uncompressing it and compiling it with mainline GCC on x86_64-linux at -O2 -g gives:
Program received signal SIGSEGV, Segmentation fault. 0x000000000053f99d in gt_ggc_mx_dw_loc_descr_struct (x_p=0x2aaae3061fa0) at ./gt-dwarf2out.h:214 warning: Source file is more recent than executable. 214 if (ggc_test_and_set_mark (x)) (gdb) p x $1 = (struct dw_loc_descr_struct * const) 0x2aaae3061fa0 (gdb) p *x $2 = {dw_loc_next = 0x0, dw_loc_opc = DW_OP_ne, dw_loc_oprnd1 = { val_class = dw_val_class_unsigned_const, v = {val_addr = 0x0, val_offset = 0, val_loc_list = 0x0, val_loc = 0x0, val_int = 0, val_unsigned = 0, val_long_long = {hi = 0, low = 0}, val_vec = { array = 0x0, length = 0, elt_size = 0}, val_die_ref = {die = 0x0, external = 0}, val_fde_index = 0, val_str = 0x0, val_lbl_id = 0x0, val_flag = 0 '\0', val_file = 0x0}}, dw_loc_oprnd2 = { val_class = dw_val_class_unsigned_const, v = {val_addr = 0x0, val_offset = 0, val_loc_list = 0x0, val_loc = 0x0, val_int = 0, val_unsigned = 0, val_long_long = {hi = 0, low = 0}, val_vec = { array = 0x0, length = 0, elt_size = 0}, val_die_ref = {die = 0x0, external = 0}, val_fde_index = 0, val_str = 0x0, val_lbl_id = 0x0, val_flag = 0 '\0', val_file = 0x0}}, dw_loc_addr = 0} (gdb) bt #0 0x000000000053f99d in gt_ggc_mx_dw_loc_descr_struct (x_p=0x2aaae3061fa0) at ./gt-dwarf2out.h:214 #1 0x000000000053f9b5 in gt_ggc_mx_dw_loc_descr_struct (x_p=0x2aaae3061f50) at ./gt-dwarf2out.h:216 #2 0x000000000053f9b5 in gt_ggc_mx_dw_loc_descr_struct (x_p=0x2aaae3061f00) at ./gt-dwarf2out.h:216 #3 0x000000000053f9b5 in gt_ggc_mx_dw_loc_descr_struct (x_p=0x2aaae3061eb0) at ./gt-dwarf2out.h:216 #4 0x000000000053fd03 in gt_ggc_mx_VEC_dw_attr_node_gc ( x_p=<value optimized out>) at ./gt-dwarf2out.h:96 #5 0x000000000053fd4d in gt_ggc_mx_die_struct (x_p=0x2aaae305c8a0) at ./gt-dwarf2out.h:361 #6 0x000000000047ed4d in gt_ggc_mx_lang_tree_node (x_p=<value optimized out>) at ./gt-fortran-f95-lang.h:325 #7 0x000000000047e9db in gt_ggc_mx_lang_tree_node (x_p=<value optimized out>) at ./gt-fortran-f95-lang.h:333 The exact command-line used is "./f951 -fmem-report all_cp2k_gfortran.f90 -O2 -g". Probably a middle-end or garbage collection issue as it goes fine with -O0. I'm not sure whether this passes for GCC 4.3.0, but I know it used to pass before 4.4 was branched off. -- Summary: [4.4 regression] segfault in gt_ggc_mx_dw_loc_descr_struct Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: fxcoudert at gcc dot gnu dot org GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36037