[Bug c++/30851] New: [4.1/4.2/4.3 regression] ICE with invalid asm statement

reichelt at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Sun Feb 18 23:20:00 GMT 2007


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

=====================================
void foo()
{
  asm ("%[x]" : [0](x));
}
=====================================

bug.cc: In function 'void foo()':
bug.cc:3: error: expected identifier before numeric constant
bug.cc:3: error: expected `]' before numeric constant
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: error: expected `)' before ']' token
bug.cc:3: internal compiler error: tree check: expected string_cst, have
error_mark in resolve_operand_name_1, at stmt.c:1320
Please submit a full bug report, [etc.]

The bug is similar to PR 30849 and PR 30850, 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=30851



More information about the Gcc-bugs mailing list