The following invalid code snippet causes an ICE on mainline:

=================================
template<int> void foo()
{
  try {}
  catch (int(0)) {}
}
=================================

  bug.cc: In function 'void foo()':
  bug.cc:4: error: expected `)' before numeric constant
  bug.cc:4: internal compiler error: tree check: expected tree that contains
'decl common' structure, have 'error_mark'  in pushdecl_maybe_friend, at
cp/name-lookup.c:574
  Please submit a full bug report, [etc.]

Will post a patch soon.


-- 
           Summary: [4.2 regression] ICE with invalid catch
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: reichelt at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


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

Reply via email to