This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42219] New: [4.5 Regression] ICE with "const void" as parameter type
- 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: 29 Nov 2009 15:58:10 -0000
- Subject: [Bug c++/42219] New: [4.5 Regression] ICE with "const void" as parameter type
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers an ICE on trunk:
=============================
void foo(const void);
void bar()
{
void (*pf)() = foo;
}
=============================
bug.cc:1:16: error: '<anonymous>' has incomplete type
bug.cc:1:20: error: invalid use of 'const void'
bug.cc: In function 'void bar()':
bug.cc:5:18: error: invalid conversion from 'void (*)(<type error>)' to 'void
(*)()'
bug.cc:5:18: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in useless_type_conversion_p, at tree-ssa.c:1426
Please submit a full bug report, [etc.]
--
Summary: [4.5 Regression] ICE with "const void" as parameter type
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Keywords: ice-on-invalid-code, error-recovery, 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=42219