Compiling CP2K with -fprofile-generate causes the resulting executable to
segfault. In gdb there is some additional 'expression error' message for the
point of the segfault:

Program received signal SIGSEGV, Segmentation fault.
fftw3_create_plan_3d (plan=DWARF-2 expression error: DW_OP_reg operations must
be used either alone or in conjuction with DW_OP_piece.
) at /data03/vondele/cjm/cp2k/src/../src/lib/fftw3_lib.F:127
127       IF (aligned) THEN
(gdb) bt
#0  fftw3_create_plan_3d (plan=DWARF-2 expression error: DW_OP_reg operations
must be used either alone or in conjuction with DW_OP_piece.
) at /data03/vondele/cjm/cp2k/src/../src/lib/fftw3_lib.F:127
#1  0x000000000182d231 in fft_create_plan_3d (plan=DWARF-2 expression error:
DW_OP_reg operations must be used either alone or in conjuction with
DW_OP_piece.

It will be hard to get a run time testcase (except getting a full copy of
CP2K). 
I'll attach the file where the segfault happens, and that can be compiled with:

gfortran -c -static -g -O2 -ffast-math -funroll-loops -ftree-vectorize
-march=native -ffree-form -fprofile-generate -D__FFTW3 fftw3_lib.F


-- 
           Summary: compilation with -fprofile-generate causes code to
                    segfault.
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          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=39964

Reply via email to