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++/28742] New: [4.2 regression] ICE with virtual destructor in invalid template class


The following invalid testcase triggers an ICE on mainline:

=========================================
template<void> struct A
{
  A();
  virtual ~A();
};

A<0> a;
=========================================

bug.cc:1: error: 'void' is not a valid type for a template constant parameter
bug.cc:3: error: templates may not be 'virtual'
bug.cc: In instantiation of 'A<<expression error> >':
bug.cc:7:   instantiated from here
bug.cc:3: internal compiler error: in finish_member_declaration, at
cp/semantics.c:2243
Please submit a full bug report, [etc.]

If I remove the constructor or destructor, the ICE happens in the same
place as PR 24791.

This is probably fallout from PR 27668.


-- 
           Summary: [4.2 regression] ICE with virtual destructor in invalid
                    template class
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
 BugsThisDependsOn: 27668


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28742


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