The following invalid code snippet triggers an ICE on the trunk
when compiled with "-Wall":

===================================
void foo(int i, ...)
{
  V v;
  __builtin_va_start(v, i);
  i = __builtin_va_arg(v, int);
}
===================================

bug.cc: In function 'void foo(int, ...)':
bug.cc:3: error: 'V' was not declared in this scope
bug.cc:3: error: expected ';' before 'v'
bug.cc:4: error: 'v' was not declared in this scope
bug.cc:5: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in operand_equal_p, at fold-const.c:3055
Please submit a full bug report, [etc.]


-- 
           Summary: [4.5 Regression] ICE with invalid va_arg
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, 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=40138

Reply via email to