Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 80738

Summary: Internal compiler error in expand_assignment, at expr.c:3450
Product: [Retired] Red Hat Linux Reporter: Alexander Viro <aviro>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED UPSTREAM QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: rth
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-05 23:42:19 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Alexander Viro 2002-12-30 17:47:20 UTC
Description of problem: on the testcase below gcc gives the above

cat >a.c <<'EOF'
struct foo {char x, y, z[2];};
struct foo f();
void bar(int baz)
        f().z[baz] = 1;
gcc -S -ansi -freg-struct-return -Wall a.c

run the above and watch
a.c: In function `bar':
a.c:5: Internal compiler error in expand_assignment, at expr.c:3450
Please submit a full bug report.
See <URL:> for instructions.
gcc -v output: gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-112.7.2)

Comment 1 Richard Henderson 2004-10-03 11:21:14 UTC
Indeed, the problem persists through to current mainline.
It appears that -freg-struct-return Just Doesn't Work.

Comment 2 Vladimir Makarov 2004-10-04 21:53:11 UTC
gcc 2.96 is too old now.  Its release cycle was finished long ago. 
Therefore I am closing the case.  If it is still important, we could
reopen it.

Comment 3 Richard Henderson 2004-10-04 22:25:45 UTC
Um, Vlad, my comment from just yesterday indicates that the problem
is still present in gcc 4.0.

Whether or not the proper resolution of this bug is to remove the
code for -freg-struct-return, since I suspect that it hasn't worked
in a very long time, is another issue.

Comment 4 Richard Henderson 2004-10-05 23:42:19 UTC
Pushed upstream to