Index: cfe/trunk/lib/Parse/ParseStmtAsm.cpp =================================================================== --- cfe/trunk/lib/Parse/ParseStmtAsm.cpp +++ cfe/trunk/lib/Parse/ParseStmtAsm.cpp @@ -323,7 +323,7 @@ SmallVector AsmToks; unsigned BraceNesting = 0; - unsigned short savedBraceCount = 0; + unsigned short savedBraceCount = BraceCount; bool InAsmComment = false; FileID FID; unsigned LineNo = 0; @@ -334,7 +334,6 @@ if (Tok.is(tok::l_brace)) { // Braced inline asm: consume the opening brace. BraceNesting = 1; - savedBraceCount = BraceCount; EndLoc = ConsumeBrace(); LBraceLocs.push_back(EndLoc); ++NumTokensRead; Index: cfe/trunk/test/Parser/ms-inline-asm.c =================================================================== --- cfe/trunk/test/Parser/ms-inline-asm.c +++ cfe/trunk/test/Parser/ms-inline-asm.c @@ -45,6 +45,9 @@ } } } +void t11() { + do { __asm mov eax, 0 __asm { __asm mov edx, 1 } } while(0); +} int t_fail() { // expected-note {{to match this}} __asm __asm { // expected-error 3 {{expected}} expected-note {{to match this}}