Bug 27279 - [4.0/4.1/4.2 regression] ICE with invalid constructor declaration
Summary: [4.0/4.1/4.2 regression] ICE with invalid constructor declaration
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.2.0
: P3 minor
Target Milestone: 4.0.4
Assignee: Volker Reichelt
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords: error-recovery, ice-on-invalid-code, monitored
Depends on:
Blocks:
 
Reported: 2006-04-24 11:38 UTC by Volker Reichelt
Modified: 2006-04-29 20:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-04-25 21:35:24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2006-04-24 11:38:02 UTC
The following invalid testcase causes an ICE since GCC 3.0:

===============================
struct A
{
  A(void,int);
};
===============================

bug.cc:3: error: '<anonymous>' has incomplete type
bug.cc:3: error: invalid use of 'void'
bug.cc:3: error: '<anonymous>' has incomplete type
bug.cc:3: error: invalid use of 'void'
bug.cc:3: internal compiler error: tree check: expected class 'type', have 'exceptional' (error_mark) in copy_fn_p, at cp/decl.c:8821
Please submit a full bug report, [etc.]

Similar to PR 27278, but ICEs in a different position.

Testing a patch.
Comment 1 patchapp@dberlin.org 2006-04-24 18:55:14 UTC
Subject: Bug number PR c++/27279

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-04/msg00930.html
Comment 2 Volker Reichelt 2006-04-29 20:48:49 UTC
Subject: Bug 27279

Author: reichelt
Date: Sat Apr 29 20:48:45 2006
New Revision: 113378

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113378
Log:
	PR c++/27279
	* decl.c (copy_fn_p): Skip functions with invalid first arg.

	* g++.dg/parse/ctor4.C: New test.

Added:
    trunk/gcc/testsuite/g++.dg/parse/ctor4.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/decl.c
    trunk/gcc/testsuite/ChangeLog

Comment 3 Volker Reichelt 2006-04-29 20:52:46 UTC
Subject: Bug 27279

Author: reichelt
Date: Sat Apr 29 20:52:24 2006
New Revision: 113379

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113379
Log:
	PR c++/27279
	* decl.c (copy_fn_p): Skip functions with invalid first arg.

	* g++.dg/parse/ctor4.C: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/g++.dg/parse/ctor4.C
Modified:
    branches/gcc-4_1-branch/gcc/cp/ChangeLog
    branches/gcc-4_1-branch/gcc/cp/decl.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog

Comment 4 Volker Reichelt 2006-04-29 20:55:48 UTC
Subject: Bug 27279

Author: reichelt
Date: Sat Apr 29 20:55:44 2006
New Revision: 113380

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=113380
Log:
	PR c++/27279
	* decl.c (copy_fn_p): Skip functions with invalid first arg.

	* g++.dg/parse/ctor4.C: New test.

Added:
    branches/gcc-4_0-branch/gcc/testsuite/g++.dg/parse/ctor4.C
Modified:
    branches/gcc-4_0-branch/gcc/cp/ChangeLog
    branches/gcc-4_0-branch/gcc/cp/decl.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog

Comment 5 Volker Reichelt 2006-04-29 20:57:03 UTC
Fixed on mainline, 4.1 branch, and 4.0 branch.
Comment 6 Volker Reichelt 2006-04-29 20:57:21 UTC
Really fixed.