Bug 21723 - [4.0 Regression] ICE while building libgfortran
[4.0 Regression] ICE while building libgfortran
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: target
4.0.0
: P2 normal
: 4.0.2
Assigned To: Not yet assigned to anyone
http://gcc.gnu.org/ml/gcc-patches/200...
: build, ice-on-valid-code, patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-23 17:11 UTC by Matthew Galgoci
Modified: 2005-07-31 00:43 UTC (History)
3 users (show)

See Also:
Host:
Target: hppa-redhat-linux
Build:
Known to work: 4.1.0 4.0.2
Known to fail: 4.0.1 3.4.4
Last reconfirmed: 2005-05-23 17:50:00


Attachments
Preprocessed source (46.99 KB, application/octet-stream)
2005-05-23 17:14 UTC, Matthew Galgoci
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Galgoci 2005-05-23 17:11:55 UTC
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.
Comment 1 Matthew Galgoci 2005-05-23 17:14:20 UTC
Created attachment 8954 [details]
Preprocessed source
Comment 2 Andrew Pinski 2005-05-23 17:14:54 UTC
The code is C.
Comment 3 Andrew Pinski 2005-05-23 17:49:59 UTC
Confirmed, reduced testcase:
void pow_c4_i4 (_Complex float a) {}

Only -mpa-risc-1-0 is needed to reproduce this.
Comment 4 Andrew Pinski 2005-05-23 17:59:06 UTC
This testcase works in 3.4.4 so it is a regression.
Comment 5 Andrew Pinski 2005-06-30 17:34:22 UTC
Patch here: <http://gcc.gnu.org/ml/gcc-patches/2005-06/msg02238.html>.
Comment 6 John David Anglin 2005-07-02 02:52:15 UTC
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.
Comment 7 John David Anglin 2005-07-02 02:58:04 UTC
The patch isn't correct.  It will return the wrong number for DCmode.
It looks like a couple of other macros also need updates.
Comment 8 CVS Commits 2005-07-05 01:57:11 UTC
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

Comment 9 John David Anglin 2005-07-05 02:21:17 UTC
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).
Comment 10 CVS Commits 2005-07-29 15:08:57 UTC
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

Comment 11 Andrew Pinski 2005-07-31 00:43:20 UTC
Fixed.
Comment 12 CVS Commits 2005-08-03 16:39:13 UTC
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