------- Comment #11 from jv244 at cam dot ac dot uk  2008-12-13 08:39 -------
(In reply to comment #10)
> (In reply to comment #9)
> > Unfortunately, '-fgraphite -fgraphite-identity -floop-block 
> > -floop-strip-mine
> > -floop-interchang' goes generate an executable, but it is miscompiled and
> > segfaults.
> 
> reduced testcase in PR38492
> 
After Sebastian Pop's fix for PR38492 the test run goes a bit further but
segfaults again, now with a different trace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x2b0112f77440 (LWP 18589)]
0x0000000000df557b in __fist_neighbor_lists_MOD_give_ijk_subcell ()
(gdb) bt
#0  0x0000000000df557b in __fist_neighbor_lists_MOD_give_ijk_subcell ()
#1  0x0000000000df7742 in __fist_neighbor_lists_MOD_build_neighbor_lists ()
#2  0x0000000000dfd0de in __fist_neighbor_lists_MOD_build_fist_neighbor_lists
()
#3  0x000000000126f50a in __topology_generate_util_MOD_topology_generate_bond
()
#4  0x0000000001223746 in __topology_MOD_connectivity_control ()
#5  0x00000000012247db in __topology_MOD_topology_control ()
#6  0x000000000113cf43 in __qs_environment_MOD_qs_init ()
#7  0x00000000007facaa in __qs_main_MOD_quickstep_create_force_env ()
#8  0x0000000000434416 in __f77_interface_MOD_create_force_env ()
#9  0x000000000040a40e in __cp2k_runs_MOD_cp2k_run ()
#10 0x000000000040dc47 in __cp2k_runs_MOD_run_input ()
#11 0x0000000000403c01 in MAIN__ ()
#12 0x00000000014483ba in main (argc=2, argv=0x7fff99be3828) at
/scratch/vondele/gcc/graphite/libgfortran/fmain.c:21

There is an earlier error by valgrind:

==18647== Conditional jump or move depends on uninitialised value(s)
==18647==    at 0xDF69A3: __fist_neighbor_lists_MOD_build_neighbor_lists (in
/scratch/vondele/clean/cp2k/exe/Linux-x86-6
4-gfortran/cp2k.sopt)
==18647==    by 0xDFD0DD: __fist_neighbor_lists_MOD_build_fist_neighbor_lists
(in /scratch/vondele/clean/cp2k/exe/Linux-
x86-64-gfortran/cp2k.sopt)
==18647==    by 0x126F509: __topology_generate_util_MOD_topology_generate_bond
(in /scratch/vondele/clean/cp2k/exe/Linux
-x86-64-gfortran/cp2k.sopt)
==18647==    by 0x1223745: __topology_MOD_connectivity_control (in
/scratch/vondele/clean/cp2k/exe/Linux-x86-64-gfortran
/cp2k.sopt)
==18647==    by 0x12247DA: __topology_MOD_topology_control (in
/scratch/vondele/clean/cp2k/exe/Linux-x86-64-gfortran/cp2
k.sopt)
==18647==    by 0x113CF42: __qs_environment_MOD_qs_init (in
/scratch/vondele/clean/cp2k/exe/Linux-x86-64-gfortran/cp2k.s
opt)
==18647==    by 0x7FACA9: __qs_main_MOD_quickstep_create_force_env (in
/scratch/vondele/clean/cp2k/exe/Linux-x86-64-gfor
tran/cp2k.sopt)
==18647==    by 0x434415: __f77_interface_MOD_create_force_env (in
/scratch/vondele/clean/cp2k/exe/Linux-x86-64-gfortran
/cp2k.sopt)
==18647==    by 0x40A40D: __cp2k_runs_MOD_cp2k_run (in
/scratch/vondele/clean/cp2k/exe/Linux-x86-64-gfortran/cp2k.sopt)
==18647==    by 0x40DC46: __cp2k_runs_MOD_run_input (in
/scratch/vondele/clean/cp2k/exe/Linux-x86-64-gfortran/cp2k.sopt)
==18647==    by 0x403C00: MAIN__ (in
/scratch/vondele/clean/cp2k/exe/Linux-x86-64-gfortran/cp2k.sopt)
==18647==    by 0x14483B9: main (fmain.c:21)

(obviously absent if compiled without graphite).

build_neighbor_lists (fist_neighbor_lists.F) is pretty loopy code, so well.. 
even though the routine is not so long, it wont be easy to reduce it, as it
depends on quite a few types defined elsewhere (it would be nice if the fortran
frontend could generate 'preprocessed' source without module dependencies,
they're similar to C header files.).


-- 


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

Reply via email to