The following valid code snippet triggers an ICE since GCC 4.0.0:

================================
struct A
{
  virtual ~A();
};

void foo()
{
  A a = ({ A b; b; });
}
================================

bug.cc: In function 'void foo()':
bug.cc:8: internal compiler error: in cp_expr_size, at cp/cp-objcp-common.c:101
Please submit a full bug report, [etc.]

This is related to PR 21440 and PR 27115.


-- 
           Summary: [4.0/4.1/4.2 regression] ICE with statement expressions
                    and virtual destructors
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-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=28730

Reply via email to