This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/31749] New: [4.1/4.2/4.3 regression] ICE with invalid redeclaration of builtin


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]