This is based on a cvs snapshot of gcc 4.0 from 2005/05/20 from the src rpm in fedora development. Reference: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=158453 /home/mgalgoci/rpm/BUILD/gcc-4.0.0-20050520/obj-hppa-redhat-linux/gcc/xgcc -B/home/mgalgoci/rpm/BUILD/gcc-4.0.0-20050520/obj-hppa-redhat-linux/gcc/ -B/usr/hppa-redhat-linux/bin/ -B/usr/hppa-redhat-linux/lib/ -isystem /usr/hppa-redhat-linux/include -isystem /usr/hppa-redhat-linux/sys-include -DHAVE_CONFIG_H -I. -I../../../libgfortran -I. -iquote../../../libgfortran/io -std=gnu99 -Wall -O2 -O2 -g -mpa-risc-1-0 -fPIC -c ../../../libgfortran/generated/pow_c4_i4.c -fPIC -DPIC -o .libs/pow_c4_i4.o ../../../libgfortran/generated/pow_c4_i4.c: In function 'pow_c4_i4': ../../../libgfortran/generated/pow_c4_i4.c:44: internal compiler error: in read_complex_part, at expr.c:2710 Please submit a full bug report, with preprocessed source if appropriate. See <URL:http://bugzilla.redhat.com/bugzilla> for instructions. Preprocessed source stored into /tmp/ccKQZCLy.out file, please attach this to your bugreport.
Created attachment 8954 [details] Preprocessed source
The code is C.
Confirmed, reduced testcase: void pow_c4_i4 (_Complex float a) {} Only -mpa-risc-1-0 is needed to reproduce this.
This testcase works in 3.4.4 so it is a regression.
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-06/msg02238.html>.
Do you have a real need to run PA 1.0 code? As far as I know, linux only runs on PA 1.1 machines and later. Very few PA 1.0 machines are still running, and we have no way to test changes other than to run it on current hardware. PA 1.0 support will be removed at the time HP-UX 10 support is removed.
The patch isn't correct. It will return the wrong number for DCmode. It looks like a couple of other macros also need updates.
Subject: Bug 21723 CVSROOT: /cvs/gcc Module name: gcc Changes by: danglin@gcc.gnu.org 2005-07-05 01:57:01 Modified files: gcc : ChangeLog gcc/config/pa : pa.md pa32-regs.h pa64-regs.h Log message: PR target/21723 * pa.md: Remove fcpy alternative from movhi and movqi patterns. * pa32-regs.h (HARD_REGNO_NREGS): Return two floating point registers for complex modes when generating code for PA 1.0. (VALID_FP_MODE_P): New macro. (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register sets for all general and floating point modes. Align wide floating point modes to even register boundaries to comply with architectural requirements. (CLASS_MAX_NREGS): Update to align with change to HARD_REGNO_NREGS. * pa64-regs.h (HARD_REGNO_NREGS): Update comment and formatting. (VALID_FP_MODE_P): New macro. (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register sets for all general and floating point modes. Align wide floating point modes to even register boundaries to comply with architectural requirements. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9337&r2=2.9338 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa.md.diff?cvsroot=gcc&r1=1.163&r2=1.164 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa32-regs.h.diff?cvsroot=gcc&r1=1.14&r2=1.15 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa64-regs.h.diff?cvsroot=gcc&r1=1.19&r2=1.20
Regarding the regression, it would appear to have been introduced when complex modes were added to GCC. I'm not quite sure when this occurred, but it was before GCC 3.0 (the oldest version that I had handy).
Subject: Bug 21723 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-4_0-branch Changes by: danglin@gcc.gnu.org 2005-07-29 15:08:45 Modified files: gcc : ChangeLog gcc/config/pa : pa.md pa32-regs.h pa64-regs.h Log message: PR target/21723 * pa.md: Remove fcpy alternative from movhi and movqi patterns. * pa32-regs.h (HARD_REGNO_NREGS): Return two floating point registers for complex modes when generating code for PA 1.0. (VALID_FP_MODE_P): New macro. (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register sets for all general and floating point modes. Align wide floating point modes to even register boundaries to comply with architectural requirements. (CLASS_MAX_NREGS): Update to align with change to HARD_REGNO_NREGS. * pa64-regs.h (HARD_REGNO_NREGS): Update comment and formatting. (VALID_FP_MODE_P): New macro. (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register sets for all general and floating point modes. Align wide floating point modes to even register boundaries to comply with architectural requirements. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.342&r2=2.7592.2.343 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa.md.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.158.6.1&r2=1.158.6.2 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa32-regs.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.14&r2=1.14.36.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa64-regs.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.18&r2=1.18.28.1
Fixed.
Subject: Bug 21723 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: danglin@gcc.gnu.org 2005-08-03 16:39:02 Modified files: gcc : ChangeLog gcc/config/pa : pa.md pa32-regs.h pa64-regs.h Log message: PR target/21723 * pa.md: Remove fcpy alternative from movhi and movqi patterns. * pa32-regs.h (HARD_REGNO_NREGS): Return two floating point registers for complex modes when generating code for PA 1.0. (VALID_FP_MODE_P): New macro. (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register sets for all general and floating point modes. Align wide floating point modes to even register boundaries to comply with architectural requirements. (CLASS_MAX_NREGS): Update to align with change to HARD_REGNO_NREGS. * pa64-regs.h (HARD_REGNO_NREGS): Update comment and formatting. (VALID_FP_MODE_P): New macro. (HARD_REGNO_MODE_OK): Use VALID_FP_MODE_P. Use non-overlapping register sets for all general and floating point modes. Align wide floating point modes to even register boundaries to comply with architectural requirements. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.895&r2=2.2326.2.896 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa.md.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.138.4.9&r2=1.138.4.10 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa32-regs.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.12&r2=1.12.20.1 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/pa/pa64-regs.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.13.10.1&r2=1.13.10.2