This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31749] New: [4.1/4.2/4.3 regression] ICE with invalid redeclaration of builtin
- 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 Apr 2007 11:11:13 -0000
- Subject: [Bug c++/31749] New: [4.1/4.2/4.3 regression] ICE with invalid redeclaration of builtin
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following invalid code snippet triggers a segfault since GCC 3.1:
========================
namespace std
{
union abort;
}
void abort();
using std::abort;
========================
bug.cc:8: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]
Compiling the code with "-fno-builtin" yields:
bug.cc:8: error: 'abort' is already declared in this scope
A slightly different testcase triggers the following ICE:
========================
namespace std
{
union abort;
}
union abort;
using std::abort;
========================
bug.cc:8: internal compiler error: tree check: expected class 'type', have
'declaration' (type_decl) in comptypes, at cp/typeck.c:1115
Please submit a full bug report, [etc.]
--
Summary: [4.1/4.2/4.3 regression] ICE with invalid redeclaration
of builtin
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=31749