Bug 16026 - [3.4/4.0 Regression] ICE in function.c:4804, assign_parms, when -mpowerpc64 & half-word operation
Summary: [3.4/4.0 Regression] ICE in function.c:4804, assign_parms, when -mpowerpc64 &...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 3.4.1
: P1 critical
Target Milestone: 3.4.1
Assignee: Richard Henderson
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2004-06-16 20:19 UTC by Geoff Keating
Modified: 2004-10-30 21:11 UTC (History)
2 users (show)

See Also:
Host:
Target: powerpc-apple-darwin6.3
Build:
Known to work: 3.4.0
Known to fail: 3.4.1 4.0.0
Last reconfirmed: 2004-06-19 19:30:36


Attachments
proposed patch (333 bytes, patch)
2004-06-21 22:20 UTC, Richard Henderson
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Geoff Keating 2004-06-16 20:19:16 UTC
The gcc.dg/darwin-longlong.c and gcc.dg/darwin-misaligned.c testcases are failing to build on the 3.4 
branch after this patch:

2004-06-08  Richard Henderson  <rth@redhat.com>

       PR middle-end/15228
       * function.c (assign_parms): Always set_mem_align with the computed
       FUNCTION_ARG_BOUNDARY.  Don't clear stack_parm if !STRICT_ALIGNMENT.

with this ICE (this example from darwin-longlong.c):

/Users/regress/tbox/cvs-gcc/gcc/gcc/testsuite/gcc.dg/darwin-longlong.c: In function `msw':
/Users/regress/tbox/cvs-gcc/gcc/gcc/testsuite/gcc.dg/darwin-longlong.c:14: internal compiler error: 
in assign_parms, at function.c:4804
Comment 1 Geoff Keating 2004-06-16 20:25:18 UTC
Also fails on HEAD.  Regression tester says only that it was introduced on the 3.4 branch between 
2004-05-08T17:45:02Z and 2004-06-16T00:30:04Z.
Comment 2 Andrew Pinski 2004-06-16 21:20:56 UTC
Confirmed.
Comment 3 Mark Mitchell 2004-06-16 21:49:15 UTC
Retargeted at 3.4.1.
Comment 4 Richard Henderson 2004-06-19 19:20:33 UTC
See the patch in 15941.
Comment 5 Andrew Pinski 2004-06-19 19:30:36 UTC
Nope the fix for PR 15941 did not fix this one.
Comment 6 Andrew Pinski 2004-06-19 19:55:26 UTC
The problem is that BITS_PER_WORD is 8 and PARM_BOUNDARY is 4 which is right for this ABI, there 
might be other cases like this too on other targets too.
Comment 7 Mark Mitchell 2004-06-21 21:37:00 UTC
Richard, status?
Comment 8 Richard Henderson 2004-06-21 22:20:33 UTC
Created attachment 6597 [details]
proposed patch

Looks like a bit of code that should have been modified the last time that
emit_group_store was improved.	Certainly it handles the given test cases.
Comment 9 Mark Mitchell 2004-06-21 22:30:12 UTC
Thanks, Richard.  Geoff, would you please boostrap/test this on Darwin to make
sure that it solves the problem?
Comment 10 Andrew Pinski 2004-06-22 23:15:29 UTC
Yes this fixes the problem, see <http://gcc.gnu.org/ml/gcc/2004-06/msg01289.html>.
Comment 11 Mark Mitchell 2004-06-22 23:16:49 UTC
Let's get it checked in, then.
Comment 12 CVS Commits 2004-06-22 23:54:11 UTC
Subject: Bug 16026

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	rth@gcc.gnu.org	2004-06-22 23:54:07

Modified files:
	gcc            : ChangeLog function.c 

Log message:
	PR middle-end/16026
	* function.c (assign_parms): Don't abort for overaligned PARALLEL.

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.519&r2=2.2326.2.520
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.483.4.15&r2=1.483.4.16

Comment 13 CVS Commits 2004-06-22 23:54:50 UTC
Subject: Bug 16026

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rth@gcc.gnu.org	2004-06-22 23:54:46

Modified files:
	gcc            : ChangeLog function.c 

Log message:
	PR middle-end/16026
	* function.c (assign_parms): Don't abort for overaligned PARALLEL.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.4083&r2=2.4084
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/function.c.diff?cvsroot=gcc&r1=1.528&r2=1.529

Comment 14 Richard Henderson 2004-06-22 23:55:02 UTC
Fixed.