Bug 18239 - [4.0 Regression] ICE in get_parm_info with werid attribute
Summary: [4.0 Regression] ICE in get_parm_info with werid attribute
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.0.0
: P2 normal
Target Milestone: 4.0.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2004-10-30 22:48 UTC by Drea Pinski
Modified: 2004-11-01 20:11 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work: 3.4.3
Known to fail: 4.0.0
Last reconfirmed: 2004-10-30 22:57:19


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Drea Pinski 2004-10-30 22:48:21 UTC
int foo  (int __attribute__ ((__mode__ (vector_size(8)))) i)
{
  return (long long) i;
}
Comment 1 Serge Belyshev 2004-10-30 22:57:19 UTC
Confirmed.
Comment 2 Drea Pinski 2004-10-31 15:31:44 UTC
: Search converges between 2004-03-01-trunk (#446) and 2004-04-01-trunk (#447).
Comment 3 Drea Pinski 2004-11-01 14:03:41 UTC
We have a function_decl at this point for vector_size.
Comment 4 Drea Pinski 2004-11-01 14:05:55 UTC
The C++ front-end rejects the code out right.
Comment 5 jsm-csl@polyomino.org.uk 2004-11-01 14:29:02 UTC
Subject: Re:  [4.0 Regression] ICE in get_parm_info with werid
 attribute

On Mon, 1 Nov 2004, pinskia at gcc dot gnu dot org wrote:

> The C++ front-end rejects the code out right.

But the bug can be triggered on valid C90 code:

int f (int [sizeof(g())]);

I'm now looking at fixing it.

Comment 6 GCC Commits 2004-11-01 19:50:04 UTC
Subject: Bug 18239

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	jsm28@gcc.gnu.org	2004-11-01 19:49:56

Modified files:
	gcc            : ChangeLog c-decl.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: parm-impl-decl-1.c parm-impl-decl-2.c 

Log message:
	PR c/18239
	* c-decl.c (get_parm_info): Allow FUNCTION_DECLs to appear amongst
	parameter declarations.
	
	testsuite:
	* gcc.dg/parm-impl-decl-1.c, gcc.dg/parm-impl-decl-2.c: New tests.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.6123&r2=2.6124
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.605&r2=1.606
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.4530&r2=1.4531
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/parm-impl-decl-1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/parm-impl-decl-2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 7 Drea Pinski 2004-11-01 20:11:00 UTC
Fixed, JSM thanks for fixing this.