This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/33969] New: [4.2/4.3 regression] ICE with const and function pointer
- From: "reichelt at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 1 Nov 2007 12:15:11 -0000
- Subject: [Bug c++/33969] New: [4.2/4.3 regression] ICE with const and function pointer
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid testcase triggers an ICE since GCC 4.2.0:
==========================
struct A;
void (*A::* fp)() const;
==========================
bug.cc:2: internal compiler error: tree check: expected function_type or
method_type, have pointer_type in build_memfn_type, at cp/decl2.c:119
Please submit a full bug report, [etc.]
In GCC 4.0.x and 4.1.x we issued a proper diagnostic:
bug.cc:2: error: 'const' and 'volatile' function specifiers on 'fp' invalid in
variable declaration
Before that, the code was wrongly accepted.
--
Summary: [4.2/4.3 regression] ICE with const and function pointer
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, monitored
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: reichelt at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33969