Created attachment 36424 [details] preprocessed source seen with trunk 20150930, /home/doko/gcc/gcc-snapshot-20150930/build/./gcc/xgcc -B/home/doko/gcc/gcc-snapshot-20150930/build/./gcc/ -B/usr/lib/gcc-snapshot/powerpc-linux-gnu/bin/ -B/usr/lib/gcc-snapshot/powerpc-linux-gnu/lib/ -isystem /usr/lib/gcc-snapshot/powerpc-linux-gnu/include -isystem /usr/lib/gcc-snapshot/powerpc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I../../../src/libgfortran -iquote../../../src/libgfortran/io -I../../../src/libgfortran/../gcc -I../../../src/libgfortran/../gcc/config -I../.././gcc -I../../../src/libgfortran/../libgcc -I../libgcc -I../../../src/libgfortran/../libbacktrace -I../libbacktrace -I../libbacktrace -std=gnu11 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wextra -Wwrite-strings -Werror=implicit-function-declaration -Werror=vla -fcx-fortran-rules -ffunction-sections -fdata-sections -g -O2 -MT fpu.lo -MD -MP -MF .deps/fpu.Tpo -c ../../../src/libgfortran/runtime/fpu.c -fPIC -DPIC -o .libs/fpu.o -save-temps fpu.s: Assembler messages: fpu.s:736: Error: symbol `.L148' is already defined fpu.s:781: Error: symbol `.L148' is already defined I Also saw this building gzlib.so in zlib. Configured with: ../src/configure -v --with-pkgversion='Ubuntu 20150930-1ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-snapshot/README.Bugs --enable-languages=c,ada,c++,java,go,fortran,objc,obj-c++ --prefix=/usr/lib/gcc-snapshot --enable-shared --enable-linker-build-id --disable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-snap-powerpc/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-snap-powerpc --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-snap-powerpc --with-arch-directory=ppc --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-secureplt --disable-softfloat --with-cpu=default32 --disable-softfloat --enable-targets=powerpc-linux,powerpc64-linux --enable-multiarch --disable-werror --with-long-double-128 --enable-multilib --enable-checking=yes --build=powerpc-linux-gnu --host=powerpc-linux-gnu --target=powerpc-linux-gnu binutils version is 2.25.1
Created attachment 36425 [details] preprocessed source
Hi! I cannot reproduce the problem; could you email me the relevant dump files? Or just everything -da produces.
Created attachment 36426 [details] rtl dumps
Created attachment 36429 [details] preprocessed source
Okay, I can reproduce the problem now (-m32 -fPIC -msecure-plt). The problem is that load_toc_v4_PIC_1_normal (and friends) create the asm label manually.
Author: segher Date: Fri Oct 2 01:29:26 2015 New Revision: 228366 URL: https://gcc.gnu.org/viewcvs?rev=228366&root=gcc&view=rev Log: rs6000: Add "cannot_copy" attribute, use it (PR67788, PR67789) After the shrink-wrapping patches the prologue will often be pushed "deeper" into the function, which in turn means the software trace cache pass will more often want to duplicate the basic block containing the prologue. This caused failures for 32-bit SVR4 with -msecure-plt PIC. This configuration uses the load_toc_v4_PIC_1 instruction, which creates assembler labels without using the normal machinery for that. If now the compiler decides to duplicate the insn, it will emit the same label twice. Boom. It isn't so easy to fix this to use labels the compiler knows about (let alone test that properly). Instead, this patch wires up a "cannot_copy" attribute to be used by TARGET_CANNOT_COPY_P, and sets that attribute on these insns we do not want copied. 2015-10-01 Segher Boessenkool <segher@kernel.crashing.org> PR target/67788 PR target/67789 * config/rs6000/rs6000.c (TARGET_CANNOT_COPY_INSN_P): New. (rs6000_cannot_copy_insn_p): New function. * config/rs6000/rs6000.md (cannot_copy): New attribute. (load_toc_v4_PIC_1_normal): Set cannot_copy. (load_toc_v4_PIC_1_476): Ditto. gcc/testsuite/ PR target/67788 PR target/67789 * gcc.target/powerpc/pr67789.c: New testcase. Added: trunk/gcc/testsuite/gcc.target/powerpc/pr67789.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/rs6000.c trunk/gcc/config/rs6000/rs6000.md trunk/gcc/testsuite/ChangeLog
Fixed.