The following invalid code snippet triggers an ICE since GCC 3.4.0:

=====================================
void foo()
{
  asm("" :: 0);
}
=====================================

bug.cc: In function 'void foo()':
bug.cc:3: error: expected string-literal before numeric constant
bug.cc:3: error: expected `(' before numeric constant
bug.cc:3: error: expected `)' before ';' token
bug.cc:3: internal compiler error: tree check: expected string_cst, have
error_mark in resolve_asm_operand_names, at stmt.c:1234
Please submit a full bug report, [etc.]

The bug is similar to PR 30849, but the crash is in a different function.


-- 
           Summary: [4.1/4.2/4.3 regression] ICE with invalid asm statement
           Product: gcc
           Version: 4.3.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=30850

Reply via email to