[Bug tree-optimization/38378] New: missed optimisation: function referenced through unused function pointer not removed
The following (contrived) example was compiled with -O3 -fwhole-program. void func1() { } void func2(void(*fn)(void)) { fn(); } void func3() { func2(&func1); } int main() { return 0; } running objdump on the output results in : 0: 4e 80 00 20 blr 0004 : 4: 94 21 ff f8 stwur1,-8(r1) 8: 7c 08 02 a6 mflrr0 c: 90 01 00 0c stw r0,12(r1) 10: 48 00 00 01 bl 10 14: 80 01 00 0c lwz r0,12(r1) 18: 38 60 00 00 li r3,0 1c: 38 21 00 08 addir1,r1,8 20: 7c 08 03 a6 mtlrr0 24: 4e 80 00 20 blr I don't expect any code for func1 to be emitted. It is never called, and func3 which takes it's address has been removed. This is obviously a bigger problem if func2 were to do some real work. compiler output: powerpc-eabispe-gcc -O3 -fwhole-program -v -c tes t.c Using built-in specs. Target: powerpc-eabispe Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.3.2/configure --prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=powerpc-eabispe --enable-languages=c --disable-nls --disable-werror --without-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2 --with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared --disable-debug --disable-libssp Thread model: single gcc version 4.3.2 (GCC) COLLECT_GCC_OPTIONS='-O3' '-fwhole-program' '-v' '-c' /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/cc1 -quiet -v test.c -quiet -dumpbase test.c -auxbase test -O3 -version -fwhole-program -o /tmp/ccHjWmTp.s ignoring nonexistent directory "/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/sys-include" ignoring nonexistent directory "/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/include" #include "..." search starts here: #include <...> search starts here: /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/include /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/include-fixed End of search list. GNU C (GCC) version 4.3.2 (powerpc-eabispe) compiled by GNU C version 4.2.3 (Ubuntu 4.2.3-2ubuntu7), GMP version 4.2.4, MPFR version 2.3.2. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: c30b16423d0b6addaa52d5eb1153852d COLLECT_GCC_OPTIONS='-O3' '-fwhole-program' '-v' '-c' /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/bin/as -mppc -mspe -me500 -many -V -Qy -o test.o /tmp/ccHjWmTp.s GNU assembler version 2.18 (powerpc-eabispe) using BFD version (GNU Binutils) 2.18 COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/bin/ LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/lib/ COLLECT_GCC_OPTIONS='-O3' '-fwhole-program' '-v' '-c' -- Summary: missed optimisation: function referenced through unused function pointer not removed Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: patrick at motec dot com dot au http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38378
[Bug tree-optimization/38379] New: missed optimisation: function referenced through unused function pointer not removed
The following (contrived) example was compiled with -O3 -fwhole-program. void func1() { } void func2(void(*fn)(void)) { fn(); } void func3() { func2(&func1); } int main() { return 0; } running objdump on the output results in : 0: 4e 80 00 20 blr 0004 : 4: 94 21 ff f8 stwur1,-8(r1) 8: 7c 08 02 a6 mflrr0 c: 90 01 00 0c stw r0,12(r1) 10: 48 00 00 01 bl 10 14: 80 01 00 0c lwz r0,12(r1) 18: 38 60 00 00 li r3,0 1c: 38 21 00 08 addir1,r1,8 20: 7c 08 03 a6 mtlrr0 24: 4e 80 00 20 blr I don't expect any code for func1 to be emitted. It is never called, and func3 which takes it's address has been removed. This is obviously a bigger problem if func2 were to do some real work. compiler output: powerpc-eabispe-gcc -O3 -fwhole-program -v -c tes t.c Using built-in specs. Target: powerpc-eabispe Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.3.2/configure --prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=powerpc-eabispe --enable-languages=c --disable-nls --disable-werror --without-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2 --with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared --disable-debug --disable-libssp Thread model: single gcc version 4.3.2 (GCC) COLLECT_GCC_OPTIONS='-O3' '-fwhole-program' '-v' '-c' /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/cc1 -quiet -v test.c -quiet -dumpbase test.c -auxbase test -O3 -version -fwhole-program -o /tmp/ccHjWmTp.s ignoring nonexistent directory "/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/sys-include" ignoring nonexistent directory "/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/include" #include "..." search starts here: #include <...> search starts here: /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/include /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/include-fixed End of search list. GNU C (GCC) version 4.3.2 (powerpc-eabispe) compiled by GNU C version 4.2.3 (Ubuntu 4.2.3-2ubuntu7), GMP version 4.2.4, MPFR version 2.3.2. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: c30b16423d0b6addaa52d5eb1153852d COLLECT_GCC_OPTIONS='-O3' '-fwhole-program' '-v' '-c' /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/bin/as -mppc -mspe -me500 -many -V -Qy -o test.o /tmp/ccHjWmTp.s GNU assembler version 2.18 (powerpc-eabispe) using BFD version (GNU Binutils) 2.18 COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/bin/ LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/lib/ COLLECT_GCC_OPTIONS='-O3' '-fwhole-program' '-v' '-c' -- Summary: missed optimisation: function referenced through unused function pointer not removed Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: patrick at motec dot com dot au http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38379
[Bug tree-optimization/38378] missed optimisation: function referenced through unused function pointer not removed
--- Comment #2 from patrick at motec dot com dot au 2008-12-03 02:03 --- It seems my searching skills need improving. Sorry for the duplicate. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38378
[Bug inline-asm/37758] New: Assembler failure: Error: syntax error; found `,' but expected `('
x error; found `,' but expected `(' fp_montgomery_reduce.s:566: Error: junk at end of line: `,3' fp_montgomery_reduce.s:577: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:577: Error: junk at end of line: `,3' fp_montgomery_reduce.s:580: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:580: Error: junk at end of line: `,3' fp_montgomery_reduce.s:604: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:604: Error: junk at end of line: `,3' fp_montgomery_reduce.s:607: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:607: Error: junk at end of line: `,3' fp_montgomery_reduce.s:621: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:621: Error: junk at end of line: `,10' fp_montgomery_reduce.s:624: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:624: Error: junk at end of line: `,10' fp_montgomery_reduce.s:634: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:634: Error: junk at end of line: `,8' fp_montgomery_reduce.s:637: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:637: Error: junk at end of line: `,8' fp_montgomery_reduce.s:647: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:647: Error: junk at end of line: `,4' fp_montgomery_reduce.s:650: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:650: Error: junk at end of line: `,4' fp_montgomery_reduce.s:660: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:660: Error: junk at end of line: `,7' fp_montgomery_reduce.s:663: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:663: Error: junk at end of line: `,7' fp_montgomery_reduce.s:673: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:673: Error: junk at end of line: `,5' fp_montgomery_reduce.s:676: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:676: Error: junk at end of line: `,5' fp_montgomery_reduce.s:686: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:686: Error: junk at end of line: `,21' fp_montgomery_reduce.s:689: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:689: Error: junk at end of line: `,21' fp_montgomery_reduce.s:700: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:700: Error: junk at end of line: `,20' fp_montgomery_reduce.s:703: Error: syntax error; found `,' but expected `(' fp_montgomery_reduce.s:703: Error: junk at end of line: `,20' -- Summary: Assembler failure: Error: syntax error; found `,' but expected `(' Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: inline-asm AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: patrick at motec dot com dot au GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: powerpc-eabispe- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37758
[Bug inline-asm/37758] Assembler failure: Error: syntax error; found `,' but expected `('
--- Comment #1 from patrick at motec dot com dot au 2008-10-06 23:06 --- Created an attachment (id=16468) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16468&action=view) preprocessed source -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37758
[Bug inline-asm/37758] Assembler failure: Error: syntax error; found `,' but expected `('
--- Comment #2 from patrick at motec dot com dot au 2008-10-06 23:10 --- The problem appears to be that the loop for (; y < pa; y++) { asm(" mullw16,%3,%4 \n\t" " mulhwu 17,%3,%4 \n\t" " addc 16,16,%0 \n\t" " addze17,17 \n\t" " lwz 18,%1 \n\t" " addc 16,16,18 \n\t" " addze%0,17 \n\t" " stw 16,%1 \n\t" :"=r"(cy),"=m"(_c[0]):"0"(cy),"r"(mu),"r"(tmpm[0]),"1"(_c[0]):"16", "17", "18","%cc"); ++tmpm;; ++_c; } is being unrolled, resulting in # 521 "src/mont/fp_montgomery_reduce.c" 1 mullw16,28,0 mulhwu 17,28,0 addc 16,16,11 addze17,17 lwz 18,4(29) addc 16,16,18 addze11,17 stw 16,4(29) # 0 "" 2 .L335: lwzx 5,31,3 # 521 "src/mont/fp_montgomery_reduce.c" 1 mullw16,28,5 mulhwu 17,28,5 addc 16,16,11 addze17,17 lwz 18,29,3 addc 16,16,18 addze11,17 stw 16,29,3 # 0 "" 2 addi 3,3,4 and so on... where the "lwz 18,29,3" is not understood by the assembler. I am currently working around this problem by making the variable _c volatile, which prevents the loop from being unrolled. -- patrick at motec dot com dot au changed: What|Removed |Added Known to fail||4.3.0 4.3.1 4.3.2 Known to work||4.1.1 4.1.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37758
[Bug inline-asm/37758] Assembler failure: Error: syntax error; found `,' but expected `('
--- Comment #4 from patrick at motec dot com dot au 2008-10-06 23:31 --- I'm not personally responsible for this code, it is part of the LibTomMath library. Changing the constraint to either =o or =g appears to resolve the problem (will need to test). -- patrick at motec dot com dot au changed: What|Removed |Added Known to fail||4.3.0 4.3.1 4.3.2 Known to work||4.1.1 4.1.2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37758
[Bug target/37759] New: powerpc option -mno-spe still generates SPE instructions
ngle-precision-constant' '-mno-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'core_thread.o' '-MP' '-MF' '.core_thread.d' '-c' '-o' 'core_thread.o' /home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/bin/as -mppc -mspe -me500 -many -V -Qy -o core_thread.o core_thread.s GNU assembler version 2.18 (powerpc-eabispe) using BFD version (GNU Binutils) 2.18 COMPILER_PATH=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/bin/ LIBRARY_PATH=/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/:/home/patrick/src/e7/toolchain/stage2/lib/gcc/powerpc-eabispe/4.3.2/../../../../powerpc-eabispe/lib/ COLLECT_GCC_OPTIONS='-I../' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/include' '-I/home/patrick/src/e7/prex/usr/include' '-nostdinc' '-fsingle-precision-constant' '-mno-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'core_thread.o' '-MP' '-MF' '.core_thread.d' '-c' '-o' 'core_thread.o' -- Summary: powerpc option -mno-spe still generates SPE instructions Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: patrick at motec dot com dot au GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: powerpc-eabispe http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37759
[Bug target/37759] powerpc option -mno-spe still generates SPE instructions
--- Comment #1 from patrick at motec dot com dot au 2008-10-07 05:07 --- Created an attachment (id=16472) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16472&action=view) preprocessed source after compiling, evstdd and evldd instructions are emitted even though the -mno-spe flag was specified. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37759
[Bug middle-end/37760] New: internal compiler error: in extract_insn, at recog.c:1990
4, MPFR version 2.3.2. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: c30b16423d0b6addaa52d5eb1153852d ecu_table.c: In function 'find_index_f32': ecu_table.c:63: error: unrecognizable insn: (insn 104 103 105 13 ecu_table.c:43 (set (reg:CCFP 193) (unspec:CCFP [ (reg:CCFP 191) (reg:CCFP 192) ] 1018)) -1 (nil)) ecu_table.c:63: internal compiler error: in extract_insn, at recog.c:1990 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: internal compiler error: in extract_insn, at recog.c:1990 Product: gcc Version: 4.3.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: patrick at motec dot com dot au GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: powerpc-eabispe http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37760
[Bug middle-end/37760] internal compiler error: in extract_insn, at recog.c:1990
--- Comment #1 from patrick at motec dot com dot au 2008-10-07 05:49 --- Created an attachment (id=16473) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16473&action=view) preprocessed source -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37760
[Bug target/37759] powerpc option -mno-spe still generates SPE instructions
--- Comment #3 from patrick at motec dot com dot au 2008-10-07 22:14 --- Created an attachment (id=16477) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16477&action=view) preprocessed source Setting -mabi=no-spe corrects the the first example. The new prexeth.i example still generates evldd/evstdd even with -mabi=no-spe, adding the -mno-spe flag makes no difference. -- patrick at motec dot com dot au changed: What|Removed |Added Attachment #16472|0 |1 is obsolete|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37759
[Bug target/37759] powerpc option -mno-spe still generates SPE instructions
--- Comment #4 from patrick at motec dot com dot au 2008-10-07 22:15 --- Forgot to add -v output: powerpc-eabispe-gcc -DLWIP_DEBUG -Iprex/include -Ilwip/src/include -Ilwip/src/include/ipv4 -I/home/patrick/src/e7/prex -I/home/patrick/src/e7/prex/usr/include -I/home/patrick/src/e7/prex/include -nostdinc -fsingle-precision-constant -mabi=no-spe -gdwarf-2 -Os -ansi -fno-strict-aliasing -Wall -Wundef -Wstrict-prototypes -Wpointer-arith -std=gnu99 -fno-stack-protector -Wno-variadic-macros -D__ppc__ -D__e7__ -D__ARCH__=ppc -D__PLATFORM__=e7 -Uppc -Ue7 -fno-omit-frame-pointer -DDEBUG -g -Wsign-compare -Werror-implicit-function-declaration -v -save-temps -MD -MT prex/prexeth.o -MP -MF .prexeth.d -I/home/patrick/src/e7/prex/dev/include -c -o prex/prexeth.o prex/prexeth.c Using built-in specs. Target: powerpc-eabispe Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.3.2/configure --prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=powerpc-eabispe --enable-languages=c --disable-nls --disable-multilib --disable-werror --without-newlib --with-gmp=/home/patrick/src/e7/toolchain/stage2 --with-mpfr=/home/patrick/src/e7/toolchain/stage2 --disable-shared --disable-debug --disable-libssp Thread model: single gcc version 4.3.2 (GCC) COLLECT_GCC_OPTIONS='-DLWIP_DEBUG' '-Iprex/include' '-Ilwip/src/include' '-Ilwip/src/include/ipv4' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/usr/include' '-I/home/patrick/src/e7/prex/include' '-nostdinc' '-fsingle-precision-constant' '-mabi=no-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'prex/prexeth.o' '-MP' '-MF' '.prexeth.d' '-I/home/patrick/src/e7/prex/dev/include' '-c' '-o' 'prex/prexeth.o' /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/cc1 -E -quiet -nostdinc -v -Iprex/include -Ilwip/src/include -Ilwip/src/include/ipv4 -I/home/patrick/src/e7/prex -I/home/patrick/src/e7/prex/usr/include -I/home/patrick/src/e7/prex/include -I/home/patrick/src/e7/prex/dev/include -MD prex/prexeth.d -MF .prexeth.d -MP -MT prex/prexeth.o -DLWIP_DEBUG -D__ppc__ -D__e7__ -D__ARCH__=ppc -D__PLATFORM__=e7 -Uppc -Ue7 -DDEBUG prex/prexeth.c -mabi=no-spe -ansi -std=gnu99 -Wall -Wundef -Wstrict-prototypes -Wpointer-arith -Wno-variadic-macros -Wsign-compare -Werror-implicit-function-declaration -fsingle-precision-constant -fno-strict-aliasing -fno-stack-protector -fno-omit-frame-pointer -fworking-directory -Os -fpch-preprocess -o prexeth.i #include "..." search starts here: #include <...> search starts here: prex/include lwip/src/include lwip/src/include/ipv4 /home/patrick/src/e7/prex /home/patrick/src/e7/prex/usr/include /home/patrick/src/e7/prex/include /home/patrick/src/e7/prex/dev/include End of search list. COLLECT_GCC_OPTIONS='-DLWIP_DEBUG' '-Iprex/include' '-Ilwip/src/include' '-Ilwip/src/include/ipv4' '-I/home/patrick/src/e7/prex' '-I/home/patrick/src/e7/prex/usr/include' '-I/home/patrick/src/e7/prex/include' '-nostdinc' '-fsingle-precision-constant' '-mabi=no-spe' '-gdwarf-2' '-Os' '-ansi' '-fno-strict-aliasing' '-Wall' '-Wundef' '-Wstrict-prototypes' '-Wpointer-arith' '-std=gnu99' '-fno-stack-protector' '-Wno-variadic-macros' '-D__ppc__' '-D__e7__' '-D__ARCH__=ppc' '-D__PLATFORM__=e7' '-Uppc' '-Ue7' '-fno-omit-frame-pointer' '-DDEBUG' '-g' '-Wsign-compare' '-Werror-implicit-function-declaration' '-v' '-save-temps' '-MD' '-MT' 'prex/prexeth.o' '-MP' '-MF' '.prexeth.d' '-I/home/patrick/src/e7/prex/dev/include' '-c' '-o' 'prex/prexeth.o' /home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.3.2/cc1 -fpreprocessed prexeth.i -quiet -dumpbase prexeth.c -mabi=no-spe -ansi -auxbase-strip prex/prexeth.o -gdwarf-2 -g -Os -Wall -Wundef -Wstrict-prototypes -Wpointer-
[Bug target/37759] powerpc option -mabi=no-spe still generates SPE instructions
--- Comment #5 from patrick at motec dot com dot au 2008-10-07 23:00 --- This looks like an option parsing problem. Building with the deprecated -mspe=no option suppresses all SPE instructions, which is what I expect/want. There seems to be no need to specify -mabi=no-spe if -mspe=no is set. -mno-spe seems to be broken. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37759
[Bug target/43810] New: [4.5 Regression] linking results in undefined references to _savegpr_* _restgpr_*_x
After migrating to gcc 4.5.0 my build is reporting these kinds of errors at link time: undefined reference to `_savegpr_31' undefined reference to `_restgpr_31_x' gcc 4.4.3 didn't emit _savegpr_* _restgpr_* etc. symbols when configured this way. powerpc-eabispe-gcc -v Using built-in specs. COLLECT_GCC=powerpc-eabispe-gcc COLLECT_LTO_WRAPPER=/home/patrick/src/e7/toolchain/stage2/libexec/gcc/powerpc-eabispe/4.5.0/lto-wrapper Target: powerpc-eabispe Configured with: /home/patrick/src/e7/toolchain/src/gcc-4.5.0/configure --prefix=/home/patrick/src/e7/toolchain/stage2 --build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu --target=powerpc-eabispe --enable-languages=c,c++ --with-sysroot=/home/patrick/src/e7/prex_sysroot --disable-nls --disable-werror --with-newlib --disable-shared --disable-debug --disable-libssp --with-cpu=8540 Thread model: single gcc version 4.5.0 (GCC) Unfortunately I'm not familiar enough with the internals of gcc to take this any further. Is there any more debugging I can provide? -- Summary: [4.5 Regression] linking results in undefined references to _savegpr_* _restgpr_*_x Product: gcc Version: 4.5.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: patrick at motec dot com dot au GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: powerpc-eabispe http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
[Bug target/43810] [4.5 Regression] linking results in undefined references to _savegpr_* _restgpr_*_x
--- Comment #2 from patrick at motec dot com dot au 2010-04-20 00:02 --- Happens while linking my program. Where in libc are they intended to live? Looking through the source it looks like they may be part of libgcc.a but for powerpc-eabispe they aren't built. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
[Bug target/43810] [4.5 Regression] linking results in undefined references to _savegpr_* _restgpr_*_x
--- Comment #3 from patrick at motec dot com dot au 2010-04-20 01:28 --- I've just done a fresh gcc build and crtsavgpr.asm crtresgpr.asm and friends definitely aren't being assembled. Am I expected to provide these functions in the library layer of my operating system? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
[Bug target/43810] [4.5 Regression] linking results in undefined references to _savegpr_* _restgpr_*_x
--- Comment #5 from patrick at motec dot com dot au 2010-04-20 23:01 --- Running powerpc-eabispe-objdump -t `powerpc-eabispe-gcc --print-libgcc-file-name` |grep _save shows no symbols so I assume something in the build process has gone wrong. Do you need me to attach my libgcc.a or any object dump output? -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
[Bug target/43810] [4.5 Regression] linking results in undefined references to _savegpr_* _restgpr_*_x
--- Comment #9 from patrick at motec dot com dot au 2010-04-30 06:57 --- Khem, Your libgcc.a looks fine. As far as I know, libgcc.a is supposed to be the last library listed when linking so the behaviour you are seeing is normal. My problem is that libgcc.a does not contain _savegpr_* and _restgpr_* functions at all. It looks like they are only built for linux and gnu targets, not eabispe. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
[Bug target/43810] [4.5 Regression] linking results in undefined references to _savegpr_* _restgpr_*_x
--- Comment #12 from patrick at motec dot com dot au 2010-05-19 22:58 --- (In reply to comment #10) > See comment #4. I believe this is a pilot error. > Richard, Are you referring to my original bug report or to Khem's link problem. I don't think (unless I've messed up my gcc build) that my original report is misuse. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43810
[Bug c/36154] New: internal compiler error: in get_constraint_for_component_ref, at tree-ssa-structalias.c:2727
ersion 2.3.1. GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: d72f763bda0b53028b002e23e9bbb24c test_xcp_eth.c: In function 'cmd_unaligned': test_xcp_eth.c:68: internal compiler error: in get_constraint_for_component_ref, at tree-ssa-structalias.c:2727 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. -- Summary: internal compiler error: in get_constraint_for_component_ref, at tree-ssa- structalias.c:2727 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: major Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: patrick at motec dot com dot au GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: powerpc-eabispe http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36154
[Bug c/36154] internal compiler error: in get_constraint_for_component_ref, at tree-ssa-structalias.c:2727
--- Comment #1 from patrick at motec dot com dot au 2008-05-06 12:46 --- Created an attachment (id=15586) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15586&action=view) preprocessed source preprocessed source for the file that causes the bug, as required by bug writing guidelines! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36154