------- Comment #4 from Joost dot VandeVondele at pci dot uzh dot ch 2010-09-14 06:04 ------- (In reply to comment #3) > > In C means that the build_eri takes a variable arguments. > :-) thanks... using 'void (*build_eri)(void);' fixes the warning... now it is an error only.
gcc -c -flto test_c.c ; gfortran -c -flto test.f90 ; ar -r all.a test_c.o test.o ; gfortran -fuse-linker-plugin -flto -O3 all.a /data03/vondele/binutils-2.20.1/build/bin/ld: error: all.a: multiple definition of 'build_eri' /data03/vondele/binutils-2.20.1/build/bin/ld: all.a: previous definition here collect2: ld returned 1 exit status notice, to reproduce the error, it is essential that the objects are put in the archive first. I've also some output of -v which seems to indicate it is really picking up the right version of ld: COLLECT_GCC_OPTIONS='-v' '-fuse-linker-plugin' '-flto' '-O3' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/collect2 -plugin /data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/liblto_plugin.so -plugin-opt=/data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper -plugin-opt=-fresolution=/tmp/cce60n2k.res -flto --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o /data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/crtbegin.o -L/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0 -L/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../.. all.a -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/crtend.o /usr/lib/../lib64/crtn.o collect2 version 4.6.0 20100913 (experimental) [trunk revision 164246] (x86-64 Linux/ELF) /data03/vondele/binutils-2.20.1/build/bin/ld -plugin /data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/liblto_plugin.so -plugin-opt=/data03/vondele/gcc_trunk/build/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper -plugin-opt=-fresolution=/tmp/cce60n2k.res --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/../lib64/crt1.o /usr/lib/../lib64/crti.o /data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/crtbegin.o -L/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0 -L/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/../../.. all.a -lgfortran -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /data03/vondele/gcc_trunk/build/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/crtend.o /usr/lib/../lib64/crtn.o /data03/vondele/binutils-2.20.1/build/bin/ld: error: all.a: multiple definition of 'build_eri' /data03/vondele/binutils-2.20.1/build/bin/ld: all.a: previous definition here gfortran @/tmp/ccYIFibu.args -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45659