If I build gamess and zeusmp with my normal spec optimization options, I get an internal compiler error in the change_address_1 function in emit-rtl.c, due to an address needing fixup has been generated after register allocation has been done. I have narrowed the options down to -m32 -mcpu=power4 -O2 -funroll-loops that causes the problem. I was able to build all of spec with the normal options on March 3rd. foo.f: In function ‘gcidav’: foo.f:670:0: internal compiler error: in change_address_1, at emit-rtl.c:1912 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions.
Created attachment 20164 [details] Reduced function that causes the problem To replicate this, use -m32 -O2 -mcpu=power4 -funroll-loops
apinski@apinski-desktop:~/src/gcc-fsf/local/gcc/objdir-ppc/gcc$ ./gfortran -B. t.f -S -m32 -mcpu=power4 -O2 -funroll-loops -v Using built-in specs. COLLECT_GCC=./gfortran Target: powerpc64-linux-gnu Configured with: ../configure --target=powerpc64-linux-gnu --enable-tls : (reconfigured) Thread model: posix gcc version 4.5.0 20100322 (experimental) [trunk revision 157646] (GCC) COLLECT_GCC_OPTIONS='-B.' '-S' '-m32' '-mcpu=power4' '-O2' '-funroll-loops' '-v' ./f951 t.f -ffixed-form -quiet -dumpbase t.f -m32 -mcpu=power4 -auxbase t -O2 -version -funroll-loops -o t.s -fintrinsic-modules-path finclude GNU Fortran (GCC) version 4.5.0 20100322 (experimental) [trunk revision 157646] (powerpc64-linux-gnu) compiled by GNU C version 4.3.2, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 GNU Fortran (GCC) version 4.5.0 20100322 (experimental) [trunk revision 157646] (powerpc64-linux-gnu) compiled by GNU C version 4.3.2, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.1 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 COMPILER_PATH=./ LIBRARY_PATH=./ COLLECT_GCC_OPTIONS='-B.' '-S' '-m32' '-mcpu=power4' '-O2' '-funroll-loops' '-v' This works for me with a cross, am I missing an option?
I just replicated on my x86_64 cross compiler: bug-43484.f: In function ‘gcidav’: bug-43484.f:670:0: internal compiler error: in change_address_1, at emit-rtl.c:1912 Please submit a full bug report, with preprocessed source if appropriate. See <http://gcc.gnu.org/bugs.html> for instructions. I used the following configure options: --enable-languages=c,c++,fortran --enable-stage1-languages=c,c++,fortran --disable-bootstrap --enable-checking=release --enable-stage1-checking --enable-decimal-float --with-long-double-128 --enable-secureplt --target=powerpc64-linux --disable-shared --disable-libssp --enable-lto
>-with-long-double-128 --enable-secureplt Those two options might cause the difference for me. Let me reconfigure my build and try again.
Subversion id 157525 does not abort, while subversion id 157540 does abort. The GCC changelog includes these changes: 2010-03-18 Steven Bosscher <steven@gcc.gnu.org> Eric Botcazou <ebotcazou@adacore.com> PR rtl-optimization/43360 * loop-invariant.c (move_invariant_reg): Remove the REG_EQUAL note if we don't know its invariant status. 2010-03-18 Michael Matz <matz@suse.de> PR tree-optimization/43402 * tree-cfgcleanup.c (cleanup_control_expr_graph): Don't follow PHI chains of ssa names registered for update. 2010-03-17 Peter Bergner <bergner@vnet.ibm.com> PR target/42427 * config/rs6000/rs6000.c (rs6000_split_multireg_move): Add support for non-offsettable and pre_modify update addressing. * config/rs6000/dfp.md (*movdd_hardfloat32): Make the "0", "1" and "2" alternatives "#". (*movdd_softfloat32): Make all alternatives "#"; * config/rs6000/rs6000.md (DIFD): New define_mode_iterator. (*movdf_hardfloat32): Make the "0", "1" and "2" alternatives "#". (*movdf_softfloat32): Make all alternatives "#"; (movdi): Use the new DIFD mode iterator to create a common splitter for movdi, movdf and movdd patterns. 2010-03-18 Shujing Zhao <pearly.zhao@oracle.com> * common.opt (dumpdir): Remove redundant tab. And the fortran Changelog includes: 2010-03-18 Shujing Zhao <pearly.zhao@oracle.com> * lang.opt (-ffixed-line-length-, ffree-line-length-): Remove redundant tab. more tomorrow.
The rs6000 change on 2010-03-17 is the culprit. If I do a svn update for the sandbox, and then do: $ svn update -r157529 gcc/config/rs6000 There is no error.
I forgot Peter was on vacation. I'll take it.
I have tracked down the issue, and will submit a patch tomorrow after further testing. The issue is when a multi-word items is loaded to GPRS, and the address is of the form (r0+reg), the compiler was using r0 as the base register, which is not allowed in the powerpc architecture.
Created attachment 20187 [details] Patch to swap registers if first register is r0 in multi-word moves. This patch fixes the problem in building the spec 2006 benchmarks zeusmp and gamess on the powerpc that was introduced in the 2010-03-17 change to rs6000.c.
Patch checked in, subversion id 157709.