------- Comment #59 from jv244 at cam dot ac dot uk  2010-07-23 22:15 -------
I'm trying a recent trunk (162490), and I'm still observing that -fwhole-file
causing linking errors. I have no easy testcase, the way to reproduce is:

download http://www.pci.unizh.ch/vandevondele/tmp/CP2K_gcc_2007_06.tgz
compile and link (takes several minutes & about 2Gb RAM) in
CP2K_gcc_2007_06/src as:

gfortran -fwhole-file -O0  all.f90 -llapack -lblas

this leads to undefined references to:

/tmp/ccSrltD0.o: In function `__fft_tools_MOD_fft3d_pb':
all.f90:(.text+0xb1c61): undefined reference to `fft_1dm_'
all.f90:(.text+0xb2824): undefined reference to `fft_1dm_'
all.f90:(.text+0xb33f7): undefined reference to `fft_1dm_'
all.f90:(.text+0xb4227): undefined reference to `fft_1dm_'
all.f90:(.text+0xb4dea): undefined reference to `fft_1dm_'
/tmp/ccSrltD0.o:all.f90:(.text+0xb5984): more undefined references to
`fft_1dm_' follow
/tmp/ccSrltD0.o: In function `mltfftsg_':
all.f90:(.text+0xdbb41a): undefined reference to `ctrig_'
all.f90:(.text+0xdbb895): undefined reference to `fftpre_'
all.f90:(.text+0xdbb95b): undefined reference to `fftstp_'
all.f90:(.text+0xdbbd14): undefined reference to `fftstp_'
all.f90:(.text+0xdbbe5c): undefined reference to `fftrot_'
all.f90:(.text+0xdbbf64): undefined reference to `fftstp_'

but goes fine without the '-fwhole-file'.


-- 


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

Reply via email to