This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/42057] New: [4.5 Regression] ICE with invalid parameter of virtual function
- 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: 15 Nov 2009 21:30:27 -0000
- Subject: [Bug c++/42057] New: [4.5 Regression] ICE with invalid parameter of virtual function
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid testcase triggers an ICE on trunk:
====================================
struct A;
struct B
{
virtual B* foo(A);
};
struct C : virtual B
{
virtual C* foo(A) { return 0; }
};
C c;
====================================
bug.cc: In member function 'virtual C* C::foo(A)':
bug.cc:10:14: error: '<anonymous>' has incomplete type
bug.cc:1:8: error: forward declaration of 'struct A'
bug.cc: In member function 'C* C::_ZTch0_v0_n16_N1C3fooE1A(A)':
bug.cc:13:4: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in create_tmp_var, at gimplify.c:504
Please submit a full bug report, [etc.]
When the code snippet is compiles with "-Wall" then the ICE happens in a
different place (the rest of the error message is identical):
bug.cc:13:4: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in operand_equal_p, at fold-const.c:3182
--
Summary: [4.5 Regression] ICE with invalid parameter of virtual
function
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=42057