Bug 20795 - ICE in assign_parms
Summary: ICE in assign_parms
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Jakub Jelinek
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2005-04-06 14:52 UTC by Jakub Jelinek
Modified: 2005-04-10 20:59 UTC (History)
1 user (show)

See Also:
Host:
Target: x86_64-linux
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-04-06 16:46:48


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Jelinek 2005-04-06 14:52:55 UTC
struct S { union {} a; } __attribute__((aligned));
void check (struct S arg)
{
}

ICEs on x86-64 at any optimization level.  Works fine in C.
Comment 1 Andrew Pinski 2005-04-06 14:57:16 UTC
Even though this is only seen with the C++ front-end, I would almost think this is a middle-end 
problem.
Comment 2 Jakub Jelinek 2005-04-06 16:46:47 UTC
It actually looks like a x86-64 target bug.
FUNCTION_ARG returns (parallel:BLK [])
Comment 3 GCC Commits 2005-04-09 17:10:15 UTC
Subject: Bug 20795

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jakub@gcc.gnu.org	2005-04-09 17:09:49

Modified files:
	gcc            : ChangeLog 
	gcc/testsuite  : ChangeLog 
	gcc/config/i386: i386.c 
Added files:
	gcc/testsuite/g++.dg/abi: param2.C 

Log message:
	PR target/20795
	* config/i386/i386.c (construct_container): Pass empty aligned
	struct, union or class in memory.
	
	* g++.dg/abi/param2.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8214&r2=2.8215
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5309&r2=1.5310
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&r1=1.805&r2=1.806
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/abi/param2.C.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 4 GCC Commits 2005-04-09 17:15:48 UTC
Subject: Bug 20795

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	jakub@gcc.gnu.org	2005-04-09 17:15:34

Modified files:
	gcc            : ChangeLog 
	gcc/testsuite  : ChangeLog 
	gcc/config/i386: i386.c 
Added files:
	gcc/testsuite/g++.dg/abi: param2.C 

Log message:
	PR target/20795
	* config/i386/i386.c (construct_container): Pass empty aligned
	struct, union or class in memory.
	
	* g++.dg/abi/param2.C: New test.

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.148&r2=2.7592.2.149
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.119&r2=1.5084.2.120
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/i386/i386.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.795.6.3&r2=1.795.6.4
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/abi/param2.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1

Comment 5 Andrew Pinski 2005-04-10 20:59:45 UTC
Fixed.